curl/src
Adam Sampson 45a560390c
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
2017-08-09 19:24:16 +02:00
..
macos docs/comments: Update to secure URL versions 2017-08-08 21:41:07 +02:00
.gitignore VC: remove the makefile.vc6 build infra 2017-01-23 14:27:32 +01:00
CMakeLists.txt includes: remove curl/curlbuild.h and curl/curlrules.h 2017-06-14 11:07:33 +02:00
Makefile.Watcom s/cURL/curl 2016-11-07 10:36:23 +01:00
Makefile.am make: fix docs build on OpenBSD 2017-07-10 13:54:02 +02:00
Makefile.b32 URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
Makefile.inc curl: remove tool_writeenv.[ch] 2017-05-06 23:13:08 +02:00
Makefile.m32 Makefile.m32: enable -W for MinGW32 build 2017-06-16 22:32:22 +02:00
Makefile.netware s/cURL/curl 2016-11-07 10:36:23 +01:00
curl.rc *.rc: escape non-ASCII/non-UTF-8 character for clarity 2017-01-19 11:35:48 +00:00
makefile.amiga s/cURL/curl 2016-11-07 10:36:23 +01:00
makefile.dj curl: remove tool_writeenv.[ch] 2017-05-06 23:13:08 +02:00
mkhelp.pl mkhelp.pl: fix script name in usage text 2017-06-19 12:28:28 +02:00
slist_wc.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
slist_wc.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_binmode.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_binmode.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_bname.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_bname.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_dbg.c tool: Fix missing prototype warnings for CURL_DOES_CONVERSIONS 2017-05-01 14:48:45 -04:00
tool_cb_dbg.h curl: fix callback functions to match prototype 2017-03-30 14:59:14 +02:00
tool_cb_hdr.c gcc7: fix ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context] 2017-03-30 14:29:08 +02:00
tool_cb_hdr.h curl: fix callback argument inconsistency 2017-03-29 10:05:12 +02:00
tool_cb_prg.c tool_cb_prg: fix double-promotion warning 2017-05-01 11:46:44 +02:00
tool_cb_prg.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_rea.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_rea.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_see.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_see.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_cb_wrt.c tool_cb_wrt: fix variable shadowing warning 2017-07-09 14:38:10 +02:00
tool_cb_wrt.h curl: fix callback argument inconsistency 2017-03-29 10:05:12 +02:00
tool_cfgable.c --request-target: instead of --strip-path-slash 2017-06-21 23:39:10 +02:00
tool_cfgable.h curl --socks5-{basic,gssapi}: control socks5 auth 2017-06-28 08:03:00 +02:00
tool_convert.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_convert.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_dirhie.c curl_setup_once: Remove ERRNO/SET_ERRNO macros 2017-07-10 02:09:27 -04:00
tool_dirhie.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_doswin.c FindWin32CACert: Use a temporary buffer on the stack 2017-06-11 17:32:02 +02:00
tool_doswin.h tool_doswin: Improve sanitization processing 2016-02-05 01:44:27 -05:00
tool_easysrc.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_easysrc.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_formparse.c tool: fix remaining -Wcast-qual warnings 2017-05-09 19:20:28 +02:00
tool_formparse.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_getparam.c curl: detect and bail out early on parameter integer overflows 2017-08-07 09:38:45 +02:00
tool_getparam.h curl: detect and bail out early on parameter integer overflows 2017-08-07 09:38:45 +02:00
tool_getpass.c Improve code readbility 2017-03-13 23:11:45 +01:00
tool_getpass.h checksrc: code style: use 'char *name' style 2016-11-24 23:58:22 +01:00
tool_help.c tool_help: clarify --include is only for response headers 2017-07-29 01:33:25 -04:00
tool_help.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_helpers.c curl: detect and bail out early on parameter integer overflows 2017-08-07 09:38:45 +02:00
tool_helpers.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_homedir.c tool: fix Windows Unicode build 2017-04-04 23:04:29 +02:00
tool_homedir.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_hugehelp.c.cvs tests: checksrc compliance 2016-12-19 02:31:59 -05:00
tool_hugehelp.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_libinfo.c strcase: make the tool use curl_str[n]equal instead 2016-10-31 21:51:19 +01:00
tool_libinfo.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_main.c curl: prevent binary output spewed to terminal 2017-06-16 23:38:13 +02:00
tool_main.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_metalink.c metalink: remove unused printf() argument 2017-06-07 14:35:26 +02:00
tool_metalink.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_mfiles.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_mfiles.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_msgs.c tool_msgs: remove wrong cast 2017-05-08 20:23:44 +02:00
tool_msgs.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_operate.c curl --socks5-{basic,gssapi}: control socks5 auth 2017-06-28 08:03:00 +02:00
tool_operate.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_operhlp.c strcasecompare: all case insensitive string compares ignore locale now 2016-10-31 08:46:35 +01:00
tool_operhlp.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_panykey.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_panykey.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_paramhlp.c curl: do bounds check using a double comparison 2017-08-09 19:24:16 +02:00
tool_paramhlp.h curl: detect and bail out early on parameter integer overflows 2017-08-07 09:38:45 +02:00
tool_parsecfg.c getparameter: avoid returning uninitialized 'usedarg' 2017-08-05 11:52:27 +02:00
tool_parsecfg.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_sdecls.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_setopt.c curl --socks5-{basic,gssapi}: control socks5 auth 2017-06-28 08:03:00 +02:00
tool_setopt.h curl --socks5-{basic,gssapi}: control socks5 auth 2017-06-28 08:03:00 +02:00
tool_setup.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_sleep.c tool_sleep: typecast to avoid macos compiler warning 2017-07-04 10:27:36 +02:00
tool_sleep.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_strdup.c URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_strdup.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_urlglob.c glob: do not continue parsing after a strtoul() overflow range 2017-08-07 09:24:30 +02:00
tool_urlglob.h checksrc: white space edits to comply to stricter checksrc 2016-11-24 23:58:22 +01:00
tool_util.c tool_util: remove unused tvdiff_secs and remove tool_ prefix 2017-06-03 00:11:59 +02:00
tool_util.h tool_util: remove unused tvdiff_secs and remove tool_ prefix 2017-06-03 00:11:59 +02:00
tool_version.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_vms.c code: style updates 2016-04-03 22:38:36 +02:00
tool_vms.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_writeout.c curl: check for end of input in writeout backslash handling 2017-03-25 23:48:57 +01:00
tool_writeout.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
tool_xattr.c docs/comments: Update to secure URL versions 2017-08-08 21:41:07 +02:00
tool_xattr.h URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00