mirror of
https://github.com/curl/curl.git
synced 2025-01-30 14:22:33 +08:00
Gisle Vanem fixed a single-byte overflow
This commit is contained in:
parent
9273096a8a
commit
12e78a082e
@ -20,7 +20,7 @@ char *appendstring(char *string, /* original string */
|
|||||||
{
|
{
|
||||||
int len = strlen(buffer);
|
int len = strlen(buffer);
|
||||||
|
|
||||||
if((len + *stringlen) > *stralloc) {
|
if((len + *stringlen) >= *stralloc) {
|
||||||
char *newptr= realloc(string, *stralloc*2);
|
char *newptr= realloc(string, *stralloc*2);
|
||||||
if(newptr) {
|
if(newptr) {
|
||||||
string = newptr;
|
string = newptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user