gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated: mhd_str: silent sanitizer false-p


From: gnunet
Subject: [libmicrohttpd] branch master updated: mhd_str: silent sanitizer false-positive error
Date: Sun, 05 Sep 2021 17:20:36 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 73c37e06 mhd_str: silent sanitizer false-positive error
73c37e06 is described below

commit 73c37e06b137bc9440e703d2b7c7bafcf622ece8
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Sep 5 18:20:19 2021 +0300

    mhd_str: silent sanitizer false-positive error
---
 src/microhttpd/mhd_str.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/microhttpd/mhd_str.c b/src/microhttpd/mhd_str.c
index 1c77a46d..615fbe3b 100644
--- a/src/microhttpd/mhd_str.c
+++ b/src/microhttpd/mhd_str.c
@@ -821,7 +821,9 @@ MHD_str_remove_tokens_caseless_ (char *str,
         }
         /* s1 should point to the next token in the input string or beyond
          * the end of the input string */
-        if ((str + *str_len) < (s1 + tkn_len))
+        /* The next comparison is modified version of
+         * ((str + *str_len) < (s1 + tkn_len)) to silent analyzer error */
+        if (*str_len < ((size_t) (s1 - str) + tkn_len))
         { /* The rest of the 's1' is too small to match 'tkn' */
           if ((str + *str_len) > s1)
           { /* Copy the rest of the string */

-- 
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]