secure possible NULL-Pointer access in strlen
authorWilfried Goesgens <dothebart@citadel.org>
Sat, 28 Sep 2013 16:51:59 +0000 (18:51 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sat, 28 Sep 2013 16:51:59 +0000 (18:51 +0200)
citadel/msgbase.c

index d962970..064e7bb 100644 (file)
@@ -3493,7 +3493,9 @@ struct CtdlMessage *CtdlMakeMessageLen(
        }
        else {
                preformatted_text = CtdlReadMessageBody(HKEY("000"), config.c_maxmsglen, NULL, 0, 0);
-               CM_SetField(msg, eMesageText, preformatted_text, strlen(preformatted_text));
+               if (preformatted_text != NULL) {
+                       CM_SetField(msg, eMesageText, preformatted_text, strlen(preformatted_text));
+               }
        }
 
        return(msg);