Skip to content
Snippets Groups Projects
Commit 80a9e84b authored by rswindell's avatar rswindell
Browse files

Fixed "off by one" malloc/realloc bug in batch_create_list().

parent bf299146
No related branches found
No related tags found
No related merge requests found
......@@ -427,7 +427,7 @@ void sbbs_t::start_batch_download()
list_len=0;
else
list_len=strlen(list)+1; /* add one for ' ' */
if((list=(char*)realloc(list,list_len+strlen(path)))==NULL) {
if((list=(char*)realloc(list,list_len+strlen(path)+1 /* add one for '\0'*/))==NULL) {
errormsg(WHERE,ERR_ALLOC,"list",list_len+strlen(path));
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment