[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 269/282: test 1560: avoid valgrind false positives
From: |
gnunet |
Subject: |
[gnurl] 269/282: test 1560: avoid valgrind false positives |
Date: |
Wed, 01 Apr 2020 14:32:14 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit a75f12768dee349e5671022c2bbea5428e6cca19
Author: Patrick Monnerat <address@hidden>
AuthorDate: Tue Jan 28 02:44:29 2020 +0100
test 1560: avoid valgrind false positives
When using maximum code optimization level (-O3), valgrind wrongly
detects uses of uninitialized values in strcmp().
Preset buffers with all zeroes to avoid that.
---
tests/libtest/lib1560.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/libtest/lib1560.c b/tests/libtest/lib1560.c
index 6228a137b..fbe642c20 100644
--- a/tests/libtest/lib1560.c
+++ b/tests/libtest/lib1560.c
@@ -60,7 +60,7 @@ static int checkparts(CURLU *u, const char *in, const char
*wanted,
{CURLUPART_FRAGMENT, "fragment"},
{0, NULL}
};
- buf[0] = 0;
+ memset(buf, 0, sizeof(buf));
for(i = 0; parts[i].name; i++) {
char *p = NULL;
@@ -645,6 +645,9 @@ static CURLUcode updateurl(CURLU *u, const char *cmd,
unsigned int setflags)
char buf[80];
char part[80];
char value[80];
+
+ memset(part, 0, sizeof(part)); /* Avoid valgrind false positive. */
+ memset(value, 0, sizeof(value)); /* Avoid valgrind false positive. */
memcpy(buf, p, n);
buf[n] = 0;
if(2 == sscanf(buf, "%79[^=]=%79[^,]", part, value)) {
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 252/282: socks5: switch state properly when the resolve is done, (continued)
- [gnurl] 252/282: socks5: switch state properly when the resolve is done, gnunet, 2020/04/01
- [gnurl] 238/282: tests: wrap ignored test failures in braces, gnunet, 2020/04/01
- [gnurl] 255/282: seek: fix fallback for missing ftruncate on Windows, gnunet, 2020/04/01
- [gnurl] 251/282: libssh: Fix matching user-specified MD5 hex key, gnunet, 2020/04/01
- [gnurl] 256/282: tool_cb_see: set correct copyright year range, gnunet, 2020/04/01
- [gnurl] 254/282: config-win32: Windows does not have ftruncate, gnunet, 2020/04/01
- [gnurl] 262/282: runtests: fix missing use of exe_ext helper function, gnunet, 2020/04/01
- [gnurl] 261/282: ares: store dns parameters for duphandle, gnunet, 2020/04/01
- [gnurl] 266/282: lib1564: reduce number of mid-wait wakeup calls, gnunet, 2020/04/01
- [gnurl] 260/282: version: make curl_version* thread-safe without using global context, gnunet, 2020/04/01
- [gnurl] 269/282: test 1560: avoid valgrind false positives,
gnunet <=
- [gnurl] 271/282: silly web server: silent a compilation warning, gnunet, 2020/04/01
- [gnurl] 272/282: socks4: fix host resolve regression, gnunet, 2020/04/01
- [gnurl] 263/282: mime: latch last read callback status., gnunet, 2020/04/01
- [gnurl] 246/282: multi: skip EINTR check on wakeup socket if it was closed, gnunet, 2020/04/01
- [gnurl] 253/282: pause: force a connection (re-)check after unpausing, gnunet, 2020/04/01
- [gnurl] 273/282: RELEASE-NOTES: synced, gnunet, 2020/04/01
- [gnurl] 267/282: sha256: Added SecureTransport implementation, gnunet, 2020/04/01
- [gnurl] 265/282: mime: fix the binary encoder to handle large data properly, gnunet, 2020/04/01
- [gnurl] 275/282: runtests: log minimal and maximal used port numbers, gnunet, 2020/04/01
- [gnurl] 279/282: test1129: fix invalid case of closing XML-tag and Content-Length, gnunet, 2020/04/01