[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 01/02: test_str: added extra check to see why Coverity g
From: |
gnunet |
Subject: |
[libmicrohttpd] 01/02: test_str: added extra check to see why Coverity gives strange reports |
Date: |
Tue, 07 Jun 2022 20:28:49 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit b1a5840766481d9b1ce3836a176681367897cf1f
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue Jun 7 21:28:01 2022 +0300
test_str: added extra check to see why Coverity gives strange reports
---
src/microhttpd/test_str.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/microhttpd/test_str.c b/src/microhttpd/test_str.c
index 2d256dd9..fbe06270 100644
--- a/src/microhttpd/test_str.c
+++ b/src/microhttpd/test_str.c
@@ -3661,6 +3661,14 @@ check_strx_from_uint32 (void)
" Locale: %s\n", t->val, (int) rs, buf, (int) b_size,
(intptr_t) rs, get_current_locale_str ());
}
+ else if (sizeof(buf) <= rs)
+ {
+ fprintf (stderr,
+ "ERROR: dstrs_w_values[%u] has string with too many"
+ "(%u) digits, size of 'buf' should be increased.\n",
+ (unsigned int) i, (unsigned int) rs);
+ return -1;
+ }
else if (0 != memcmp (buf + rs, erase + rs, sizeof(buf) - rs))
{
if (0 == c_failed[i])
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.