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

Fix CID 174378: Argument cannot be negative

parent 431a70b1
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -4329,6 +4329,13 @@ void node_thread(void* arg)
sbbs->clearvars(&sbbs->main_csi);
sbbs->main_csi.length=(long)filelength(file);
if(sbbs->main_csi.length < 1) {
close(file);
sbbs->errormsg(WHERE,ERR_LEN, str, sbbs->main_csi.length);
sbbs->hangup();
break;
}
if((sbbs->main_csi.cs=(uchar *)malloc(sbbs->main_csi.length))==NULL) {
close(file);
sbbs->errormsg(WHERE,ERR_ALLOC,str,sbbs->main_csi.length);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment