mirror of
https://github.com/curl/curl.git
synced 2026-08-25 16:33:38 +03:00
curl: cap the maximum allowed values for retry time arguments
... to avoid integer overflows later when multiplying with 1000 to convert seconds to milliseconds. Added test 1269 to verify. Reported-by: Jason Lee Closes #4166
This commit is contained in:
parent
d23e87d551
commit
db0a0dfb0e
5 changed files with 61 additions and 4 deletions
34
tests/data/test1269
Normal file
34
tests/data/test1269
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
--retry-delay
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Server-side
|
||||
<reply>
|
||||
</reply>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
none
|
||||
</server>
|
||||
<name>
|
||||
too large --retry-delay value
|
||||
</name>
|
||||
<command>
|
||||
--retry 3 --retry-delay 9223372036854776 http://%HOSTIP:%HTTPPORT/1269
|
||||
</command>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<errorcode>
|
||||
2
|
||||
</errorcode>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue