mirror of
https://github.com/mirror/wget.git
synced 2025-01-16 23:30:17 +08:00
* src/utils.c (match_tail): Fix unsigned integer overflow
This commit is contained in:
parent
7de006bade
commit
734d0aee15
@ -1153,7 +1153,7 @@ accdir (const char *directory)
|
|||||||
bool
|
bool
|
||||||
match_tail (const char *string, const char *tail, bool fold_case)
|
match_tail (const char *string, const char *tail, bool fold_case)
|
||||||
{
|
{
|
||||||
int pos = strlen (string) - strlen (tail);
|
int pos = (int) strlen (string) - (int) strlen (tail);
|
||||||
|
|
||||||
if (pos < 0)
|
if (pos < 0)
|
||||||
return false; /* tail is longer than string. */
|
return false; /* tail is longer than string. */
|
||||||
|
Loading…
Reference in New Issue
Block a user