mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix buffer overflow. This is FreeBSD-SA-04:16.fetch.
Approved by: des
This commit is contained in:
parent
405e2987ca
commit
8c355b0889
1 changed files with 2 additions and 1 deletions
|
|
@ -584,7 +584,8 @@ fetch(char *URL, const char *path)
|
|||
/* suck in the data */
|
||||
signal(SIGINFO, sig_handler);
|
||||
while (!sigint) {
|
||||
if (us.size != -1 && us.size - count < B_size)
|
||||
if (us.size != -1 && us.size - count < B_size &&
|
||||
us.size - count >= 0)
|
||||
size = us.size - count;
|
||||
else
|
||||
size = B_size;
|
||||
|
|
|
|||
Loading…
Reference in a new issue