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 613d4f56 authored by Rob Swindell's avatar Rob Swindell 💬

If error is NULL, insure maxerrlen is 0.

Hopefully this will eliminate the "Dereference after null check" warnings by Coverity (e.g. CID 330993).
parent 3acfe026
......@@ -719,7 +719,9 @@ long extract_files_from_archive(const char* archive, const char* outdir, const c
long extracted = 0;
char fpath[MAX_PATH + 1];
if(error != NULL && maxerrlen >= 1)
if(error == NULL)
maxerrlen = 0;
if(maxerrlen >= 1)
*error = '\0';
if((ar = archive_read_new()) == NULL) {
safe_snprintf(error, maxerrlen, "archive_read_new returned NULL");
......
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