mirror of
https://github.com/curl/curl.git
synced 2026-08-24 16:23:34 +03:00
tool_urlglob: avoid overflow at end of range
Due to how the range span globbing code works, a range that ends with 9223372036854775807 (the maximum signed 63 bit value) cannot be used as it triggers an integer overflow. Verified in test 2092 Reported-by: Andrew Nesbit Closes #21529
This commit is contained in:
parent
9249aad4c2
commit
3ce10063f1
3 changed files with 33 additions and 3 deletions
28
tests/data/test2092
Normal file
28
tests/data/test2092
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="US-ASCII"?>
|
||||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
globbing
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
http
|
||||
</server>
|
||||
<name>
|
||||
glob range that ends with 9223372036854775807
|
||||
</name>
|
||||
<command>
|
||||
"%HOSTIP:%HTTPPORT/[0-1][9223372036854775806-9223372036854775807]/%TESTNUMBER"
|
||||
</command>
|
||||
</client>
|
||||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<errorcode>
|
||||
3
|
||||
</errorcode>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue