Do not crash if path is NULL in DEBUG_ProcessElfFileFromPath.

This commit is contained in:
Dmitry Timoshkov 2000-08-18 23:43:09 +00:00 committed by Alexandre Julliard
parent 909b677e83
commit 7d64d7d1d7
1 changed files with 3 additions and 1 deletions

View File

@ -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';