Skip to content
Snippets Groups Projects
Commit aff554a4 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix crash due to use after free or double-free

... bug introduced in commit 29a35642.

strListMerge() doesn't realloc the strings in the list, so we don't want to
free the strings in this list here.

This is likely the cause of the crash Keyop eluded to in #synchronet.
parent 3f0bbb17
No related branches found
No related tags found
No related merge requests found
Pipeline #6601 passed
......@@ -139,7 +139,7 @@ bool sbbs_t::unpack_qwk(char *packet,uint hubnum)
msg_filters.twit_list = list_of_twits(&cfg);
str_list_t ip_silent_list = trashcan_list(&cfg, "ip-silent");
strListMerge(&msg_filters.ip_can, ip_silent_list);
strListFree(&ip_silent_list);
free(ip_silent_list);
for(l=QWK_BLOCK_LEN;l<size;l+=blocks*QWK_BLOCK_LEN) {
if(terminated) {
......
......@@ -175,7 +175,7 @@ bool sbbs_t::unpack_rep(char* repfile)
msg_filters.twit_list = list_of_twits(&cfg);
str_list_t ip_silent_list = trashcan_list(&cfg, "ip-silent");
strListMerge(&msg_filters.ip_can, ip_silent_list);
strListFree(&ip_silent_list);
free(ip_silent_list);
now=time(NULL);
for(l=QWK_BLOCK_LEN;l<size;l+=blocks*QWK_BLOCK_LEN) {
......
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