mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 11:19:59 -04:00
Clear errno before calling strtol
The previous code was incorrectly clearing errno after calling
strtol but before testing the result rather than clearing it and
then calling strtol so that changes to errno can be correctly
determined.
(cherry picked from commit d3ffa1f007)
This commit is contained in:
parent
379683473a
commit
92f0ff77a2
1 changed files with 1 additions and 2 deletions
|
|
@ -432,9 +432,8 @@ process_request(isc_httpd_t *httpd, size_t last_len) {
|
|||
|
||||
if (name_match(header, "Content-Length")) {
|
||||
char *endptr;
|
||||
long val = strtol(header->value, &endptr, 10);
|
||||
|
||||
errno = 0;
|
||||
long val = strtol(header->value, &endptr, 10);
|
||||
|
||||
/* ensure we consumed all digits */
|
||||
if ((header->value + header->value_len) != endptr) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue