[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 204/256: curl: make str2udouble not return values o
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 204/256: curl: make str2udouble not return values on error |
Date: |
Fri, 06 Oct 2017 19:44:55 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 697271fc980331ffb53f12850f82c80ed182a375
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Sep 15 16:38:48 2017 +0200
curl: make str2udouble not return values on error
... previously it would store a return value even when it returned
error, which could make the value get used anyway!
Reported-by: Brian Carpenter
Closes #1893
---
src/tool_paramhlp.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
index 42631e9c3..7cddf51ce 100644
--- a/src/tool_paramhlp.c
+++ b/src/tool_paramhlp.c
@@ -242,14 +242,16 @@ static ParameterError str2double(double *val, const char
*str, long max)
* data.
*/
-ParameterError str2udouble(double *val, const char *str, long max)
+ParameterError str2udouble(double *valp, const char *str, long max)
{
- ParameterError result = str2double(val, str, max);
+ double value;
+ ParameterError result = str2double(&value, str, max);
if(result != PARAM_OK)
return result;
- if(*val < 0)
+ if(value < 0)
return PARAM_NEGATIVE_NUMERIC;
+ *valp = value;
return PARAM_OK;
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 56/256: winbuild: fix embedded manifest option, (continued)
- [GNUnet-SVN] [gnurl] 56/256: winbuild: fix embedded manifest option, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 236/256: connect: fix race condition with happy eyeballs timeout, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 44/256: makefile.m32: add support for libidn2, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 167/256: vtls: switch to CURL_SHA256_DIGEST_LENGTH define, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 54/256: examples/threaded-ssl: mention that this is for openssl before 1.1, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 188/256: checksrc: detect and warn for multiple spaces, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 233/256: http: add custom empty headers to repeated requests, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 115/256: ossfuzz: moving towards the ideal integration, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 241/256: cookie: fix memory leak if path was set twice in header, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 49/256: test1453: Fixed <features>, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 204/256: curl: make str2udouble not return values on error,
gnunet <=
- [GNUnet-SVN] [gnurl] 225/256: symbols-in-versions: fix CURLSSLSET_NO_BACKENDS entry, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 196/256: docs: clarify the CURLOPT_INTERLEAVE* options behavior, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 154/256: mime: unified to use the typedef'd mime structs everywhere, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 246/256: FTP: zero terminate the entry path even on bad input, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 102/256: RELEASE-NOTES: synced with 8c33c963a, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 238/256: test1160: verifies cookie leak for large cookies, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 245/256: cmake: disable tests and man generation if perl/nroff not found, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 150/256: examples/mime: minor example code fixes, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 234/256: docs: clarify the use of environment variables for proxy, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 128/256: mime: tests and examples., gnunet, 2017/10/06