[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 03/41: curl: do bounds check using a double compari
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 03/41: curl: do bounds check using a double comparison |
Date: |
Sun, 20 Aug 2017 20:46:25 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.55.1
in repository gnurl.
commit 45a560390c4356bcb81d933bbbb229c8ea2acb63
Author: Adam Sampson <address@hidden>
AuthorDate: Wed Aug 9 14:11:17 2017 +0100
curl: do bounds check using a double comparison
The fix for this in 8661a0aacc01492e0436275ff36a21734f2541bb wasn't
complete: if the parsed number in num is larger than will fit in a long,
the conversion is undefined behaviour (causing test1427 to fail for me
on IA32 with GCC 7.1, although it passes on AMD64 and ARMv7). Getting
rid of the cast means the comparison will be done using doubles.
It might make more sense for the max argument to also be a double...
Fixes #1750
Closes #1749
---
src/tool_paramhlp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
index b9dedc989..85c5e79a7 100644
--- a/src/tool_paramhlp.c
+++ b/src/tool_paramhlp.c
@@ -218,7 +218,7 @@ static ParameterError str2double(double *val, const char
*str, long max)
num = strtod(str, &endptr);
if(errno == ERANGE)
return PARAM_NUMBER_TOO_LARGE;
- if((long)num > max) {
+ if(num > max) {
/* too large */
return PARAM_NUMBER_TOO_LARGE;
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] annotated tag gnurl-7.55.1 created (now fe79f5af0), gnunet, 2017/08/20
- [GNUnet-SVN] [gnurl] 01/41: build: fix 'make install' with configure, install docs/libcurl/* too, gnunet, 2017/08/20
- [GNUnet-SVN] [gnurl] 04/41: dist: Add dictserver.py/negtelnetserver.py to EXTRA_DIST, gnunet, 2017/08/20
- [GNUnet-SVN] [gnurl] 06/41: gitignore: ignore top-level .vs folder, gnunet, 2017/08/20
- [GNUnet-SVN] [gnurl] 03/41: curl: do bounds check using a double comparison,
gnunet <=
- [GNUnet-SVN] [gnurl] 07/41: build: check out *.sln files with Windows line endings, gnunet, 2017/08/20
- [GNUnet-SVN] [gnurl] 10/41: metalink: fix error: ‘*’ in boolean context, suggest ‘&&’ instead, gnunet, 2017/08/20
- [GNUnet-SVN] [gnurl] 09/41: dist: fix the cmake build by shipping cmake_uninstall.cmake.in too, gnunet, 2017/08/20
- [GNUnet-SVN] [gnurl] 02/41: make install: add 8 missing man pages to the installation, gnunet, 2017/08/20
- [GNUnet-SVN] [gnurl] 16/41: openssl: fix "error: this statement may fall through", gnunet, 2017/08/20
- [GNUnet-SVN] [gnurl] 21/41: test2033: this went flaky again, gnunet, 2017/08/20
- [GNUnet-SVN] [gnurl] 20/41: test1447: verifies the parse proxy fix in 6e0e152ce5c, gnunet, 2017/08/20
- [GNUnet-SVN] [gnurl] 15/41: openssl: remove CONST_ASN1_BIT_STRING., gnunet, 2017/08/20
- [GNUnet-SVN] [gnurl] 08/41: travis: verify "make install", gnunet, 2017/08/20
- [GNUnet-SVN] [gnurl] 19/41: parse_proxy(): fix memory leak in case of invalid proxy server name, gnunet, 2017/08/20