From ae8b4b23925718a32718cdc81528de1925325062 Mon Sep 17 00:00:00 2001 From: James Forshaw Date: Thu, 13 Jan 2022 06:18:35 -0800 Subject: [PATCH] Fix symbol URI generation. --- NtApiDotNet/Win32/DllDebugData.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NtApiDotNet/Win32/DllDebugData.cs b/NtApiDotNet/Win32/DllDebugData.cs index c76442428..b0fedc433 100644 --- a/NtApiDotNet/Win32/DllDebugData.cs +++ b/NtApiDotNet/Win32/DllDebugData.cs @@ -63,8 +63,12 @@ public string GetSymbolPath(string symbol_url) } string encoded_name = Uri.EscapeDataString(filename); + string base_path = uri.AbsolutePath.Trim('/'); + base_path = string.Join("/", base_path, encoded_name, IdentiferPath, encoded_name); + if (!base_path.StartsWith("/")) + base_path = "/" + base_path; - return new Uri(uri, string.Join("/", uri.AbsolutePath, encoded_name, IdentiferPath, encoded_name)).ToString(); + return new Uri(uri, base_path).ToString(); } private const uint CV_RSDS_MAGIC = 0x53445352;