gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r37030 - libmicrohttpd/src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r37030 - libmicrohttpd/src/microhttpd
Date: Tue, 12 Apr 2016 16:36:09 +0200

Author: Karlson2k
Date: 2016-04-12 16:36:09 +0200 (Tue, 12 Apr 2016)
New Revision: 37030

Modified:
   libmicrohttpd/src/microhttpd/connection.c
Log:
connection.c: used internal US-ASCII-only hex string -> value conversion

Modified: libmicrohttpd/src/microhttpd/connection.c
===================================================================
--- libmicrohttpd/src/microhttpd/connection.c   2016-04-12 14:36:06 UTC (rev 
37029)
+++ libmicrohttpd/src/microhttpd/connection.c   2016-04-12 14:36:09 UTC (rev 
37030)
@@ -1644,7 +1644,6 @@
   int instant_retry;
   int malformed;
   char *buffer_head;
-  char *end;
 
   if (NULL != connection->response)
     return;                     /* already queued a response */
@@ -1715,9 +1714,9 @@
               malformed = (i >= 6);
               if (!malformed)
                 {
-                  buffer_head[i] = '\0';
-                 connection->current_chunk_size = strtoul (buffer_head, &end, 
16);
-                  malformed = ('\0' != *end);
+                  size_t num_dig = MHD_strx_to_sizet_n_ (buffer_head, i,
+                                                         
&connection->current_chunk_size);
+                  malformed = (i != num_dig);
                 }
               if (malformed)
                 {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]