Skip to content

Commit b3e86ee

Browse files
BenBEBrice Figureau
and
Brice Figureau
committed
Properly check for end of data when looking for the tracking id
Co-authored-by: Brice Figureau <[email protected]>
1 parent 9043432 commit b3e86ee

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

ngx_http_uploadprogress_module.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,8 @@ get_tracking_id(ngx_http_request_t * r)
376376
i = 1;
377377
break;
378378
}
379-
else if (!len) {
380-
break;
381-
}
382-
} while (p++);
379+
p++;
380+
} while (len > 0);
383381

384382
if (i) {
385383
start_p = p += upcf->header.len + 1;
@@ -469,10 +467,8 @@ get_tracking_ids_mul(ngx_http_request_t * r)
469467
i = 1;
470468
break;
471469
}
472-
else if (!len) {
473-
break;
474-
}
475-
} while (p++);
470+
p++;
471+
} while (len > 0);
476472

477473
if (i) {
478474
start_p = p += upcf->header_mul.len + 1;

0 commit comments

Comments
 (0)