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

Handle filelength() returning negative value

CID 33260
parent 6385c925
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -225,6 +225,10 @@ js_sendfile(JSContext *cx, uintN argc, jsval *arglist)
free(fname);
len=filelength(file);
if(len < 1) {
close(file);
return(JS_TRUE);
}
if((buf=malloc((size_t)len))==NULL) {
close(file);
return(JS_TRUE);
......
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