[Privoxy-commits] [privoxy] 06/30: parse_time_header(): Silence a coverity complaint when building without assertions

User Git git at git.privoxy.org
Thu Nov 11 04:41:56 UTC 2021


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

git pushed a commit to branch master
in repository privoxy.

commit 46007ab54e24280df96ea44b1cf09cc32514e6bd
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Sat Mar 27 11:07:12 2021 +0100

    parse_time_header(): Silence a coverity complaint when building without assertions
---
 parsers.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/parsers.c b/parsers.c
index dcb12305..1cb46dfe 100644
--- a/parsers.c
+++ b/parsers.c
@@ -4628,7 +4628,10 @@ static jb_err parse_time_header(const char *header, time_t *result)
     * through sed() which requires a header name followed by
     * a colon.
     */
-   assert(header_time != NULL);
+   if (header_time == NULL)
+   {
+      return JB_ERR_PARSE;
+   }
 
    header_time++;
    if (*header_time == ' ')

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Privoxy-commits mailing list