[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 33/153: mime: check Curl_rand_hex's return code
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 33/153: mime: check Curl_rand_hex's return code |
Date: |
Tue, 11 Sep 2018 12:51:44 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit d3905419444614463506243930be1648fb2d7aa7
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Jul 26 16:55:59 2018 +0300
mime: check Curl_rand_hex's return code
Bug: https://curl.haxx.se/mail/archive-2018-07/0015.html
Reported-by: Jeffrey Walton
Closes #2795
---
lib/mime.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/mime.c b/lib/mime.c
index fd7beb9a4..ca492d11a 100644
--- a/lib/mime.c
+++ b/lib/mime.c
@@ -1228,8 +1228,13 @@ curl_mime *curl_mime_init(struct Curl_easy *easy)
}
memset(mime->boundary, '-', 24);
- Curl_rand_hex(easy, (unsigned char *) mime->boundary + 24,
- MIME_RAND_BOUNDARY_CHARS + 1);
+ if(Curl_rand_hex(easy, (unsigned char *) mime->boundary + 24,
+ MIME_RAND_BOUNDARY_CHARS + 1)) {
+ /* failed to get random separator, bail out */
+ free(mime->boundary);
+ free(mime);
+ return NULL;
+ }
mimesetstate(&mime->state, MIMESTATE_BEGIN, NULL);
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 73/153: docs: mention NULL is fine input to several functions, (continued)
- [GNUnet-SVN] [gnurl] 73/153: docs: mention NULL is fine input to several functions, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 66/153: telnet: Remove unused macros TELOPTS and TELCMDS, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 69/153: asyn-thread: Remove unused macro, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 70/153: test1540: Remove unused macro TEST_HANG_TIMEOUT, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 64/153: configure: fix for -lpthread detection with OpenSSL and pkg-config, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 65/153: openssl: fix debug messages, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 36/153: conn_free: updated comment to clarify, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 41/153: examples/ephiperfifo: checksrc compliance, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 62/153: windows: follow up to the buffer-tuning 1ba1dba7, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 59/153: CMake: Respect BUILD_SHARED_LIBS, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 33/153: mime: check Curl_rand_hex's return code,
gnunet <=
- [GNUnet-SVN] [gnurl] 54/153: lib/Makefile: only do symbol hiding if told to, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 38/153: tests/http_pipe.py: Use /usr/bin/env to find python, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 57/153: cmake: link curl to the OpenSSL targets instead of lib absolute paths, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 48/153: mailmap: Daniel Jelinski, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 42/153: travis: run a 'make checksrc' too, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 46/153: curl: use Content-Disposition before the "URL end" for -OJ, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 29/153: docs/CURLOPT_WRITEFUNCTION: size is always 1, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 58/153: cmake: bumped minimum version to 3.4, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 26/153: system_win32: fix version checking, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 56/153: travis: build darwinssl on macos 10.12, gnunet, 2018/09/11