gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 242/335: Fixes


From: gnunet
Subject: [libmicrohttpd] 242/335: Fixes
Date: Sat, 27 Jul 2024 22:02:18 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to tag stf-m2
in repository libmicrohttpd.

commit e5abd457624d31998ded9b684ca6ec2b9b85fac7
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Fri Jul 19 06:11:06 2024 +0200

    Fixes
---
 src/mhd2/mhd_str.c                | 6 +++---
 src/mhd2/stream_process_reply.c   | 3 ++-
 src/mhd2/stream_process_request.c | 9 +++++----
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/mhd2/mhd_str.c b/src/mhd2/mhd_str.c
index 8ffa3596..41195429 100644
--- a/src/mhd2/mhd_str.c
+++ b/src/mhd2/mhd_str.c
@@ -1422,13 +1422,13 @@ mhd_uint32_to_strx (uint_fast32_t val,
 
 #ifndef MHD_FAVOR_SMALL_CODE
 MHD_INTERNAL size_t
-mhd_uint16_to_str (uint_fast16_t val,
+mhd_uint16_to_str (uint_least16_t val,
                    char *buf,
                    size_t buf_size)
 {
   char *chr;  /**< pointer to the current printed digit */
   /* The biggest printable number is 65535 */
-  uint_fast16_t divisor = UINT16_C (10000);
+  uint_least16_t divisor = UINT16_C (10000);
   int digit;
 
   chr = buf;
@@ -1450,7 +1450,7 @@ mhd_uint16_to_str (uint_fast16_t val,
     buf_size--;
     if (1 == divisor)
       return (size_t) (chr - buf);
-    val = (uint_fast16_t) (val % divisor);
+    val = (uint_least16_t) (val % divisor);
     divisor /= 10;
     digit = (int) (val / divisor);
     mhd_assert (digit < 10);
diff --git a/src/mhd2/stream_process_reply.c b/src/mhd2/stream_process_reply.c
index 9be978d8..68b06d8d 100644
--- a/src/mhd2/stream_process_reply.c
+++ b/src/mhd2/stream_process_reply.c
@@ -34,6 +34,7 @@
 #include "sys_bool_type.h"
 #include "sys_base_types.h"
 
+#include <string.h>
 #ifdef HAVE_TIME_H
 #  include <time.h>
 #endif
@@ -829,7 +830,7 @@ build_header_response_inn (struct MHD_Connection *restrict 
c)
       else
       {
         mhd_assert ((! c->rp.props.send_reply_body) || \
-                    (mhd_CONN_MUST_CLOSE = c->conn_reuse));
+                    (mhd_CONN_MUST_CLOSE == c->conn_reuse));
         (void) 0;
       }
     }
diff --git a/src/mhd2/stream_process_request.c 
b/src/mhd2/stream_process_request.c
index 42b21ea2..2176a905 100644
--- a/src/mhd2/stream_process_request.c
+++ b/src/mhd2/stream_process_request.c
@@ -1132,7 +1132,7 @@ mhd_parse_get_args (size_t args_len,
         if (i < args_len)
           args[i] = 0;
         mhd_assert (0 == args[i]);
-        break; /* End if the parameter */
+        break; /* End of the parameter */
       }
     }
 
@@ -1143,9 +1143,10 @@ mhd_parse_get_args (size_t args_len,
       mhd_assert (name_start + 2 <= value_start);
       name_len = value_start - name_start - 2;
 
-      value_len = mhd_str_pct_decode_lenient_n (args + value_start, value_len,
-                                                args + value_start, value_len,
-                                                NULL); // TODO: add support 
for broken encoding detection
+      value_len =
+        mhd_str_pct_decode_lenient_n (args + value_start, i - value_len,
+                                      args + value_start, i - value_len,
+                                      NULL); // TODO: add support for broken 
encoding detection
       value.cstr = args + value_start;
       value.len = value_len;
     }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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