From: Wilfried Goesgens Date: Thu, 16 Sep 2010 20:19:40 +0000 (+0200) Subject: * rare crash in some weird edge case. don't dereference unchecked pointers... X-Git-Tag: v8.01~714 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=4072a5bb052b5e79f274d1dd0d5f5ff117359046;p=citadel.git * rare crash in some weird edge case. don't dereference unchecked pointers... --- diff --git a/libcitadel/lib/wildfire.c b/libcitadel/lib/wildfire.c index 623c3b7c2..7d4499e3c 100644 --- a/libcitadel/lib/wildfire.c +++ b/libcitadel/lib/wildfire.c @@ -157,9 +157,13 @@ static int addr2lineBacktrace(StrBuf *Function, pche = strchr(pch, ':'); FlushStrBuf(FileName); StrBufAppendBufPlain(FileName, pch, pche - pch, 0); - pche++; - *FunctionLine = atoi(pche); - + if (pche != NULL) + { + pche++; + *FunctionLine = atoi(pche); + } + else + *FunctionLine = 0; return 1; }