[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] branch master updated: test_postprocessor: fixed printf(
From: |
gnunet |
Subject: |
[libmicrohttpd] branch master updated: test_postprocessor: fixed printf() called with NULL pointer |
Date: |
Sat, 11 Sep 2021 12:26:56 +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 706a156f test_postprocessor: fixed printf() called with NULL pointer
706a156f is described below
commit 706a156f9e7f4ce5113bae3e1951a99edc7a8c7a
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sat Sep 11 13:19:57 2021 +0300
test_postprocessor: fixed printf() called with NULL pointer
---
src/microhttpd/test_postprocessor.c | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
diff --git a/src/microhttpd/test_postprocessor.c
b/src/microhttpd/test_postprocessor.c
index ba32411b..22f8600e 100644
--- a/src/microhttpd/test_postprocessor.c
+++ b/src/microhttpd/test_postprocessor.c
@@ -114,9 +114,12 @@ value_checker (void *cls,
#if MHD_DEBUG_PP
fprintf (stderr,
"VC: `%s' `%s' `%s' `%s' `%.*s' (%d)\n",
- key, filename, content_type, transfer_encoding,
- (int) size,
- data,
+ key ? key : "(NULL)",
+ filename ? filename : "(NULL)",
+ content_type ? content_type : "(NULL)",
+ transfer_encoding ? transfer_encoding : "(NULL)",
+ (int) (data ? size : 6),
+ data ? data : "(NULL)",
(int) size);
#endif
if ( (0 != off) && (0 == size) )
@@ -138,16 +141,19 @@ value_checker (void *cls,
*want_off = -1;
fprintf (stderr,
"Failed with: `%s' `%s' `%s' `%s' `%.*s'\n",
- key, filename, content_type, transfer_encoding,
- (int) size,
- data);
+ key ? key : "(NULL)",
+ filename ? filename : "(NULL)",
+ content_type ? content_type : "(NULL)",
+ transfer_encoding ? transfer_encoding : "(NULL)",
+ (int) (data ? size : 6),
+ data ? data : "(NULL)");
fprintf (stderr,
"Wanted: `%s' `%s' `%s' `%s' `%s'\n",
- want[idx],
- want[idx + 1],
- want[idx + 2],
- want[idx + 3],
- want[idx + 4]);
+ want[idx] ? want[idx] : "(NULL)",
+ want[idx + 1] ? want[idx + 1] : "(NULL)",
+ want[idx + 2] ? want[idx + 2] : "(NULL)",
+ want[idx + 3] ? want[idx + 3] : "(NULL)",
+ want[idx + 4] ? want[idx + 4] : "(NULL)");
fprintf (stderr,
"Unexpected result: %d/%d/%d/%d/%d/%d/%d\n",
(idx < 0),
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libmicrohttpd] branch master updated: test_postprocessor: fixed printf() called with NULL pointer,
gnunet <=