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 a441edf0 authored by rswindell's avatar rswindell

Fix potential double-close() call in File.open() method implementation:

if fdopen() failed, we'd close the file descriptor but leave it dangling with
a >= 0 value and then call close() again on it later in the function.
parent 564a071e
......@@ -183,8 +183,7 @@ js_open(JSContext *cx, uintN argc, jsval *arglist)
/* Remove (C11 standard) 'x'clusive mode char to avoid MSVC assertion: */
for(e=strchr(fdomode, 'x'); e ; e=strchr(e, 'x'))
memmove(e, e+1, strlen(e));
if((p->fp=fdopen(file,fdomode))==NULL)
close(file);
p->fp=fdopen(file,fdomode);
}
free(fdomode);
}
......
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