mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
[9.20] fix: dev: Clear errno correctly
Zero errno before calling strtol. Closes #5773 Backport of MR !11625 Merge branch 'backport-5773-clear-errno-correctly-9.20' into 'bind-9.20' See merge request isc-projects/bind9!11703
This commit is contained in:
commit
0de8a66011
1 changed files with 1 additions and 2 deletions
|
|
@ -425,9 +425,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