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

Fix CID 33239: Argument cannot be negative

parent 9169e4aa
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -861,6 +861,11 @@ void sbbs_t::removeline(char *str, char *str2, char num, char skip)
return;
}
flen=(long)filelength(file);
if(flen < 0) {
close(file);
errormsg(WHERE, ERR_CHK, str, flen);
return;
}
slen=strlen(str2);
if((buf=(char *)malloc(flen))==NULL) {
close(file);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment