From 7d64d7d1d7973c1ee52fe953d14ce2372f6511ad Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Fri, 18 Aug 2000 23:43:09 +0000 Subject: [PATCH] Do not crash if path is NULL in DEBUG_ProcessElfFileFromPath. --- debugger/stabs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debugger/stabs.c b/debugger/stabs.c index c91ff1aba5c..4ea572dff79 100644 --- a/debugger/stabs.c +++ b/debugger/stabs.c @@ -1280,10 +1280,12 @@ leave: static int DEBUG_ProcessElfFileFromPath(const char * filename, unsigned int load_offset, const char* path) { - int rtn = FALSE; + int rtn = -1; char *s, *t, *fn; char* paths = NULL; + if (!path) return -1; + for (s = paths = DBG_strdup(path); s && *s; s = (t) ? (t+1) : NULL) { t = strchr(s, ':'); if (t) *t = '\0'; -- 2.11.4.GIT