musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015年07月08日 02:46:45 +0000
committerRich Felker <dalias@aerifal.cx>2015年07月08日 02:46:45 +0000
commite8cbe0bad4284906230a53af4c91ad2b9713d03b (patch)
treeec041b63c7378848f5bfb11709131fd5995656cf /src
parentfb58545f8d1c5fa32122244caeaf3625c12ddc01 (diff)
downloadmusl-e8cbe0bad4284906230a53af4c91ad2b9713d03b.tar.gz
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')
-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;
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月01日 22:46:41 +0000

AltStyle によって変換されたページ (->オリジナル) /