[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 70/125: rand: add a clang-analyzer work-around
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 70/125: rand: add a clang-analyzer work-around |
Date: |
Sun, 21 Jan 2018 23:42:05 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 02f207a76b45129e4d033c099e6d17581801c76e
Author: Daniel Stenberg <address@hidden>
AuthorDate: Wed Dec 13 00:45:42 2017 +0100
rand: add a clang-analyzer work-around
scan-build would warn on a potential access of an uninitialized
buffer. I deem it a false positive and had to add this somewhat ugly
work-around to silence it.
---
lib/rand.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/rand.c b/lib/rand.c
index 2670af9d9..0769ed151 100644
--- a/lib/rand.c
+++ b/lib/rand.c
@@ -157,6 +157,12 @@ CURLcode Curl_rand_hex(struct Curl_easy *data, unsigned
char *rnd,
unsigned char *bufp = buffer;
DEBUGASSERT(num > 1);
+#ifdef __clang_analyzer__
+ /* This silences a scan-build warning about accesssing this buffer with
+ uninitialized memory. */
+ memset(buffer, 0, sizeof(buffer));
+#endif
+
if((num/2 >= sizeof(buffer)) || !(num&1))
/* make sure it fits in the local buffer and that it is an odd number! */
return CURLE_BAD_FUNCTION_ARGUMENT;
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 118/125: SSH: Fix state machine for ssh-agent authentication, (continued)
- [GNUnet-SVN] [gnurl] 118/125: SSH: Fix state machine for ssh-agent authentication, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 07/125: Added support for libssh SSH SCP back-end, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 42/125: curl.h: remove incorrect comment about ERRORBUFFER, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 46/125: CURLOPT_PRIVATE.3: fix grammar, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 39/125: BINDINGS: another PostgreSQL client, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 47/125: sftp: allow quoted commands to use relative paths, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 38/125: CONNECT: keep close connection flag in http_connect_state struct, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 78/125: build-wolfssl.bat: Added support for VC15, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 90/125: openssl: fix memory leak of SSLKEYLOGFILE filename, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 98/125: http2: fix incorrect trailer buffer size, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 70/125: rand: add a clang-analyzer work-around,
gnunet <=
- [GNUnet-SVN] [gnurl] 66/125: libssh: fix a syntax error in configure.ac, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 72/125: brotli: allow compiling with version 0.6.0., gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 111/125: CURLOPT_TCP_NODELAY.3: fix typo, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 104/125: test393: verify --max-filesize with excessive Content-Length, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 109/125: openssl: enable SSLKEYLOGFILE support by default, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 88/125: test1554: improve the error handling, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 87/125: test1554: add global initialization and cleanup, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 97/125: easy: fix connection ownership in curl_easy_pause, gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 89/125: Revert "curl/system.h: fix compilation with gcc on AIX PPC and IA64 HP-UX", gnunet, 2018/01/21
- [GNUnet-SVN] [gnurl] 105/125: test394: verify abort of rubbish in Content-Length: value, gnunet, 2018/01/21