49 lines
1.3 KiB
Diff
49 lines
1.3 KiB
Diff
From 01ff771caac1958662ca8665eed2021ec386a7af Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
|
|
Date: Wed, 12 Aug 2026 19:45:21 +0200
|
|
Subject: [PATCH] * src/http.c (parse_content_range): Use strtoll instead of
|
|
strtol.
|
|
|
|
CVE: CVE-2026-58470
|
|
Upstream: https://gitlab.com/gnuwget/wget/-/commit/01ff771caac1958662ca8665eed2021ec386a7af
|
|
Signed-off-by: Stefan Müller <stemu86@gmx.ch>
|
|
|
|
---
|
|
src/http.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/http.c b/src/http.c
|
|
index e5e75ee6..8170a43c 100644
|
|
--- a/src/http.c
|
|
+++ b/src/http.c
|
|
@@ -949,7 +949,7 @@ parse_content_range (const char *hdr, wgint *first_byte_ptr,
|
|
return false;
|
|
|
|
errno = 0;
|
|
- num = strtol(hdr, &end, 10);
|
|
+ num = strtoll(hdr, &end, 10);
|
|
if (errno == ERANGE)
|
|
return false;
|
|
hdr = end;
|
|
@@ -959,7 +959,7 @@ parse_content_range (const char *hdr, wgint *first_byte_ptr,
|
|
*first_byte_ptr = num;
|
|
|
|
errno = 0;
|
|
- num = strtol(hdr, &end, 10);
|
|
+ num = strtoll(hdr, &end, 10);
|
|
if (errno == ERANGE)
|
|
return false;
|
|
hdr = end;
|
|
@@ -976,7 +976,7 @@ parse_content_range (const char *hdr, wgint *first_byte_ptr,
|
|
else
|
|
{
|
|
errno = 0;
|
|
- num = strtol(hdr, NULL, 10);
|
|
+ num = strtoll(hdr, NULL, 10);
|
|
if (errno == ERANGE)
|
|
return false;
|
|
}
|
|
--
|
|
GitLab
|
|
|