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 c487956b authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Check return value of JS_ValueToInt32()

CID 331092
parent cc06b0b5
......@@ -765,7 +765,8 @@ js_format_file_name(JSContext *cx, uintN argc, jsval *arglist)
JSVALUE_TO_STRBUF(cx, argv[argn], filepath, sizeof(filepath), NULL);
argn++;
if(argn < argc && JSVAL_IS_NUMBER(argv[argn])) {
JS_ValueToInt32(cx, argv[argn], &size);
if(!JS_ValueToInt32(cx, argv[argn], &size))
return JS_FALSE;
argn++;
}
if(argn < argc && JSVAL_IS_BOOLEAN(argv[argn])) {
......
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