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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user