From 006efb357f4fc2af4f7a9ed52d39f1ddf3aab4e3 Mon Sep 17 00:00:00 2001
From: Sergey Turchanov <turchanov@usa.net>
Date: Sat, 13 Mar 1999 12:44:38 +0000
Subject: [PATCH] Buffer size bug in LocateDebugInfoFile.

---
 debugger/msc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/debugger/msc.c b/debugger/msc.c
index 77314113149..7565dc039cb 100644
--- a/debugger/msc.c
+++ b/debugger/msc.c
@@ -48,13 +48,13 @@ static void LocateDebugInfoFile(char *filename, char *dbg_filename)
     file = strrchr(filename, '\\');
     if( file == NULL ) file = filename; else file++;
 
-    if (GetEnvironmentVariableA("_NT_SYMBOL_PATH", str1, sizeof(str1)))
-	if (SearchPathA(str1, file, NULL, sizeof(str2), str2, &name_part))
+    if (GetEnvironmentVariableA("_NT_SYMBOL_PATH", str1, MAX_PATHNAME_LEN))
+	if (SearchPathA(str1, file, NULL, MAX_PATHNAME_LEN*10, str2, &name_part))
 	    goto ok;
-    if (GetEnvironmentVariableA("_NT_ALT_SYMBOL_PATH", str1, sizeof(str1)))
-	if (SearchPathA(str1, file, NULL, sizeof(str2), str2, &name_part))
+    if (GetEnvironmentVariableA("_NT_ALT_SYMBOL_PATH", str1, MAX_PATHNAME_LEN))
+	if (SearchPathA(str1, file, NULL, MAX_PATHNAME_LEN*10, str2, &name_part))
 	    goto ok;
-    if (SearchPathA(NULL, file, NULL, sizeof(str2), str2, &name_part))
+    if (SearchPathA(NULL, file, NULL, MAX_PATHNAME_LEN*10, str2, &name_part))
 	goto ok;
     else
     {
-- 
GitLab