aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/microhttpd/connection.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index e6b367a8..d9ba4807 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1644,7 +1644,6 @@ process_request_body (struct MHD_Connection *connection)
1644 int instant_retry; 1644 int instant_retry;
1645 int malformed; 1645 int malformed;
1646 char *buffer_head; 1646 char *buffer_head;
1647 char *end;
1648 1647
1649 if (NULL != connection->response) 1648 if (NULL != connection->response)
1650 return; /* already queued a response */ 1649 return; /* already queued a response */
@@ -1715,9 +1714,9 @@ process_request_body (struct MHD_Connection *connection)
1715 malformed = (i >= 6); 1714 malformed = (i >= 6);
1716 if (!malformed) 1715 if (!malformed)
1717 { 1716 {
1718 buffer_head[i] = '\0'; 1717 size_t num_dig = MHD_strx_to_sizet_n_ (buffer_head, i,
1719 connection->current_chunk_size = strtoul (buffer_head, &end, 16); 1718 &connection->current_chunk_size);
1720 malformed = ('\0' != *end); 1719 malformed = (i != num_dig);
1721 } 1720 }
1722 if (malformed) 1721 if (malformed)
1723 { 1722 {