Corrected what appears to be a long-standing error in the "extract

unique" code.  It was using DBEraseLabelsByContent() which would
erase all matching labels, and could potentially erase labels that
were still remaining on the list being processed, causing a segfault.
Also corrected minor errors identified by valgrind during debugging
the above-referenced problem.
This commit is contained in:
Tim Edwards
2020-11-03 12:17:16 -05:00
parent f7eb54fac7
commit 9931244e1e
7 changed files with 13 additions and 22 deletions
+3 -2
View File
@@ -734,8 +734,9 @@ again:
}
/* Remove any ".mag" file extension from the name */
if (!strcmp(returnname + strlen(returnname) - 4, ".mag"))
*(returnname + strlen(returnname) - 4) = '\0';
if (strlen(returnname) > 4)
if (!strcmp(returnname + strlen(returnname) - 4, ".mag"))
*(returnname + strlen(returnname) - 4) = '\0';
if (strcmp(returnname, def->cd_name) != 0)
{