mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-10-01 17:11:44 -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 static ghidra.formats.gfilesystem.fileinfo.FileAttributeType.*;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import org.apache.commons.io.FilenameUtils;
|
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
|
// use the name of the 7zip file itself, minus the extension
|
||||||
itemPath = FilenameUtils.getBaseName(fsrl.getContainer().getName());
|
itemPath = FilenameUtils.getBaseName(fsrl.getContainer().getName());
|
||||||
}
|
}
|
||||||
|
if (itemPath.isEmpty()) {
|
||||||
|
itemPath = "<blank>";
|
||||||
|
}
|
||||||
return itemPath;
|
return itemPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user