[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.
- [libmicrohttpd] 221/335: GENERATED: more edits, (continued)
- [libmicrohttpd] 221/335: GENERATED: more edits, gnunet, 2024/07/27
- [libmicrohttpd] 227/335: -fix typo, gnunet, 2024/07/27
- [libmicrohttpd] 228/335: -fix typo, gnunet, 2024/07/27
- [libmicrohttpd] 207/335: Renamed sys_socket_types.h -> sys_sockets_types.h, gnunet, 2024/07/27
- [libmicrohttpd] 234/335: Follow-up for 631d550d6ed81be0ebd5a06e107868e5153da430, gnunet, 2024/07/27
- [libmicrohttpd] 238/335: More portability, gnunet, 2024/07/27
- [libmicrohttpd] 212/335: configure: check for uintptr_t type, gnunet, 2024/07/27
- [libmicrohttpd] 214/335: configure: added check for various levels of compound literals support, gnunet, 2024/07/27
- [libmicrohttpd] 243/335: Copy-paste fixes, gnunet, 2024/07/27
- [libmicrohttpd] 225/335: Still WIP, gnunet, 2024/07/27
- [libmicrohttpd] 242/335: Fixes,
gnunet <=
- [libmicrohttpd] 245/335: WIP-4, gnunet, 2024/07/27
- [libmicrohttpd] 231/335: WIP more, gnunet, 2024/07/27
- [libmicrohttpd] 235/335: GNU/Linux fixes, gnunet, 2024/07/27
- [libmicrohttpd] 237/335: GNU/Linux fixes-3, gnunet, 2024/07/27
- [libmicrohttpd] 236/335: More GNU/Linux fixes, gnunet, 2024/07/27
- [libmicrohttpd] 251/335: Implemented MHD_daemon_get_info_fixed_sz(), gnunet, 2024/07/27
- [libmicrohttpd] 246/335: WIP-5, gnunet, 2024/07/27
- [libmicrohttpd] 224/335: Minor update, gnunet, 2024/07/27
- [libmicrohttpd] 253/335: fix issues in test logic, gnunet, 2024/07/27
- [libmicrohttpd] 240/335: more example test code, gnunet, 2024/07/27