mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-25 17:00:36 -09:00
GP-1944 fix zip file entry with empty name, github issue #4128
This commit is contained in:
@@ -18,9 +18,10 @@ package ghidra.file.formats.sevenzip;
|
||||
|
||||
import static ghidra.formats.gfilesystem.fileinfo.FileAttributeType.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
|
||||
@@ -124,6 +125,9 @@ public class SevenZipFileSystem implements GFileSystem {
|
||||
// use the name of the 7zip file itself, minus the extension
|
||||
itemPath = FilenameUtils.getBaseName(fsrl.getContainer().getName());
|
||||
}
|
||||
if (itemPath.isEmpty()) {
|
||||
itemPath = "<blank>";
|
||||
}
|
||||
return itemPath;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user