projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb58545
)
fix negated return value of ns_skiprr, breakage in related functions
author
Rich Felker
<dalias@aerifal.cx>
Wed, 8 Jul 2015 02:46:45 +0000
(
02:46
+0000)
committer
Rich Felker
<dalias@aerifal.cx>
Wed, 8 Jul 2015 02:46:45 +0000
(
02:46
+0000)
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.
src/network/ns_parse.c
patch
|
blob
|
history
diff --git
a/src/network/ns_parse.c
b/src/network/ns_parse.c
index 3ff33a870ad4c4f5758ba1d0a7dafb2148335edb..d01da47a3d41112ab50c0239b9bff63c9cbe5963 100644
(file)
--- 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 p
tr - p
;
+ return p
- ptr
;
bad:
errno = EMSGSIZE;
return -1;