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

Check return value of filelength()

Fix CID 33266: Negative loop bound
parent ac6313df
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -686,6 +686,10 @@ int sbbs_t::searchup(char *search,int usernum)
return(usernum);
flen=(long)filelength(file);
if(flen < 0) {
close(file);
return usernum;
}
lseek(file,(long)((long)usernum*U_LEN),0);
while((i*U_LEN)<=(ulong)flen) {
......
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