mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-10 14:02:43 +00:00
Fix buffer overflow. This is FreeBSD-SA-04:16.fetch.
Approved by: des
This commit is contained in:
parent
405e2987ca
commit
8c355b0889
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137854
@ -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 New Issue
Block a user