From c848e4ee861c57810772f0c64bd8377607e641f4 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 3 Dec 2009 00:33:02 +0100 Subject: [PATCH] riched20: Check for NULL in rtf reader (Coverity). --- dlls/riched20/reader.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/riched20/reader.c b/dlls/riched20/reader.c index a589a8e0786..de468c747cf 100644 --- a/dlls/riched20/reader.c +++ b/dlls/riched20/reader.c @@ -1109,7 +1109,10 @@ static void ReadStyleSheet(RTF_Info *info) } sep = New (RTFStyleElt); if (sep == NULL) + { ERR ( "%s: cannot allocate style element\n", fn); + break; + } sep->rtfSEClass = info->rtfClass; sep->rtfSEMajor = info->rtfMajor; sep->rtfSEMinor = info->rtfMinor;