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

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
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -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");
......
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