Commit eb7e6bbf authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Fix CID 174378: Argument cannot be negative

parent 431a70b1
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment