mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
parent
7abca1531f
commit
83abd68029
6 changed files with 59 additions and 26 deletions
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
ssize_t ParseContentLength(const char *s, size_t n) {
|
||||
int i, r = 0;
|
||||
if (!n) return -1;
|
||||
if (!n) return 0;
|
||||
for (i = 0; i < n; ++i) {
|
||||
if (!isdigit(s[i])) return -1;
|
||||
if (__builtin_mul_overflow(r, 10, &r)) return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue