mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-19 11:28:06 +08:00
Merge remote-tracking branch 'origin/GP-6715_dev747368_localdirdebuginfod_filepath'
This commit is contained in:
+3
@@ -95,6 +95,9 @@ public class BuildIdDebugFileProvider implements DebugFileProvider {
|
||||
}
|
||||
File bucketDir = new File(rootDir, buildId.substring(0, 2));
|
||||
File file = new File(bucketDir, buildId.substring(2) + ".debug");
|
||||
if (!rootDir.equals(bucketDir.getParentFile()) || !bucketDir.equals(file.getParentFile())) {
|
||||
throw new IOException("Bad buildid: " + buildId);
|
||||
}
|
||||
return file.isFile() ? file : null;
|
||||
}
|
||||
|
||||
|
||||
+7
-3
@@ -167,11 +167,15 @@ public class LocalDirDebugInfoDProvider implements DebugFileStorage {
|
||||
return null;
|
||||
}
|
||||
|
||||
private File getBuildidDir(String buildId) {
|
||||
return new File(rootDir, buildId);
|
||||
private File getBuildidDir(String buildId) throws IOException {
|
||||
File dir = new File(rootDir, buildId);
|
||||
if (rootDir.equals(dir.getParentFile())) {
|
||||
throw new IOException("Bad buildid value: " + buildId);
|
||||
}
|
||||
return dir;
|
||||
}
|
||||
|
||||
private File getCachePath(ExternalDebugInfo id) {
|
||||
private File getCachePath(ExternalDebugInfo id) throws IOException {
|
||||
String suffix = "";
|
||||
if (id.getObjectType() == ObjectType.SOURCE) {
|
||||
suffix = "-" + escapePath(Objects.requireNonNullElse(id.getExtra(), ""));
|
||||
|
||||
Reference in New Issue
Block a user