Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 2c3842bd authored by Rob Swindell's avatar Rob Swindell 💬

Handle filelength() returning negative value

CID 33260
parent 6385c925
......@@ -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);
......
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