diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-07-08 02:46:45 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-07-08 02:46:45 +0000 |
commit | e8cbe0bad4284906230a53af4c91ad2b9713d03b (patch) | |
tree | ec041b63c7378848f5bfb11709131fd5995656cf /src/network | |
parent | fb58545f8d1c5fa32122244caeaf3625c12ddc01 (diff) | |
download | musl-e8cbe0bad4284906230a53af4c91ad2b9713d03b.tar.gz musl-e8cbe0bad4284906230a53af4c91ad2b9713d03b.tar.bz2 musl-e8cbe0bad4284906230a53af4c91ad2b9713d03b.tar.xz musl-e8cbe0bad4284906230a53af4c91ad2b9713d03b.zip |
fix negated return value of ns_skiprr, breakage in related functions
due to a reversed pointer difference computation, ns_skiprr always
returned a negative value, which functions using it would interpret as
an error.
patch by Yu Lu.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/ns_parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/ns_parse.c b/src/network/ns_parse.c index 3ff33a87..d01da47a 100644 --- a/src/network/ns_parse.c +++ b/src/network/ns_parse.c @@ -95,7 +95,7 @@ int ns_skiprr(const unsigned char *ptr, const unsigned char *eom, ns_sect sectio p += r; } } - return ptr - p; + return p - ptr; bad: errno = EMSGSIZE; return -1; |