procmail/procmail-3.22-CVE-2017-16844.patch
Troy Dawson bb2c54444b RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/procmail#673722facf425123ced54ecaada732cf5340ec35
2020-10-14 16:31:49 -07:00

14 lines
530 B
Diff

diff --git a/src/formisc.c b/src/formisc.c
index 5c2869d..54fd013 100644
--- a/src/formisc.c
+++ b/src/formisc.c
@@ -103,7 +103,7 @@ void loadsaved(sp)const struct saved*const sp; /* load some saved text */
}
/* append to buf */
void loadbuf(text,len)const char*const text;const size_t len;
-{ if(buffilled+len>buflen) /* buf can't hold the text */
+{ while(buffilled+len>buflen) /* buf can't hold the text */
buf=realloc(buf,buflen+=Bsize);
tmemmove(buf+buffilled,text,len);buffilled+=len;
}