diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-19 01:09:39 +0100 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-19 01:09:39 +0100 |
commit | fedec814a0af828f9c4e97ed49cdb727e0d64ad0 (patch) | |
tree | 6614288d9f0937b640d0efcb757a6ea13bac7a6d /src/input/pnm.c | |
parent | 5c2f96797e1ad0c9e1e930fd86941fcec27abdc4 (diff) | |
parent | 64596f317f7d03ed1f3e747cd2b0664b1d4f6535 (diff) | |
download | xine-lib-fedec814a0af828f9c4e97ed49cdb727e0d64ad0.tar.gz xine-lib-fedec814a0af828f9c4e97ed49cdb727e0d64ad0.tar.bz2 |
Merge from 1.2 branch.
Diffstat (limited to 'src/input/pnm.c')
-rw-r--r-- | src/input/pnm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input/pnm.c b/src/input/pnm.c index 38d65b850..942e52957 100644 --- a/src/input/pnm.c +++ b/src/input/pnm.c @@ -21,6 +21,8 @@ * based upon code from joschka */ +#include <config.h> + #include <unistd.h> #include <stdio.h> #include <sys/socket.h> @@ -732,9 +734,7 @@ pnm_t *pnm_connect(xine_stream_t *stream, const char *mrl) { pathbegin=slash-mrl_ptr; hostend=colon-mrl_ptr; - p->host = malloc(sizeof(char)*hostend+1); - strncpy(p->host, mrl_ptr, hostend); - p->host[hostend]=0; + p->host = strndup(mrl_ptr, hostend); if (pathbegin < strlen(mrl_ptr)) p->path=strdup(mrl_ptr+pathbegin+1); if (colon != slash) { |