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

Fix CID 33235: Argument cannot be negative

parent 300cc8fc
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2881 passed
......@@ -1278,7 +1278,7 @@ bool sbbs_t::editfile(char *fname, bool msg)
}
if((file=nopen(fname,O_RDONLY))!=-1) {
length=(long)filelength(file);
if(length>(long)maxlines*MAX_LINE_LEN) {
if(length < 0 || length>(long)maxlines*MAX_LINE_LEN) {
close(file);
free(buf);
attr(cfg.color[clr_err]);
......
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