diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-09-05 18:20:19 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2021-09-05 18:20:19 +0300 |
commit | 73c37e06b137bc9440e703d2b7c7bafcf622ece8 (patch) | |
tree | cfff7a31aff1cc6fc35a6fd62bf716f8620066a7 | |
parent | dc802aa5eae2fc5821ee03915c501c8880c62677 (diff) | |
download | libmicrohttpd-73c37e06b137bc9440e703d2b7c7bafcf622ece8.tar.gz libmicrohttpd-73c37e06b137bc9440e703d2b7c7bafcf622ece8.zip |
mhd_str: silent sanitizer false-positive error
-rw-r--r-- | src/microhttpd/mhd_str.c | 4 |
1 files changed, 3 insertions, 1 deletions
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, | |||
821 | } | 821 | } |
822 | /* s1 should point to the next token in the input string or beyond | 822 | /* s1 should point to the next token in the input string or beyond |
823 | * the end of the input string */ | 823 | * the end of the input string */ |
824 | if ((str + *str_len) < (s1 + tkn_len)) | 824 | /* The next comparison is modified version of |
825 | * ((str + *str_len) < (s1 + tkn_len)) to silent analyzer error */ | ||
826 | if (*str_len < ((size_t) (s1 - str) + tkn_len)) | ||
825 | { /* The rest of the 's1' is too small to match 'tkn' */ | 827 | { /* The rest of the 's1' is too small to match 'tkn' */ |
826 | if ((str + *str_len) > s1) | 828 | if ((str + *str_len) > s1) |
827 | { /* Copy the rest of the string */ | 829 | { /* Copy the rest of the string */ |