mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-29 01:24:51 +02:00
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:
+3
-2
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user