Browse Source

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.
master
Rich Felker 11 years ago
parent
commit
e8cbe0bad4
  1. 2
      src/network/ns_parse.c

2
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; p += r;
} }
} }
return ptr - p; return p - ptr;
bad: bad:
errno = EMSGSIZE; errno = EMSGSIZE;
return -1; return -1;

Loading…
Cancel
Save