[PATCH] riched20: Exit the loop instead of crashing (Coverity)
Marcus Meissner
marcus at jet.franken.de
Thu Jan 29 02:42:33 CST 2009
Hi,
CID 194. We exit the loop instead of crashing in the line
below. Probably needs more sensible error recovery, but
we should approach this when necessary.
Ciao, Marcus
---
dlls/riched20/reader.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/riched20/reader.c b/dlls/riched20/reader.c
index 7fc952b..295d6d8 100644
--- a/dlls/riched20/reader.c
+++ b/dlls/riched20/reader.c
@@ -1090,8 +1090,10 @@ static void ReadStyleSheet(RTF_Info *info)
if (RTFCheckCM (info, rtfGroup, rtfEndGroup))
break;
sp = New (RTFStyle);
- if (sp == NULL)
+ if (sp == NULL) {
ERR ( "%s: cannot allocate stylesheet entry\n", fn);
+ break;
+ }
sp->rtfSName = NULL;
sp->rtfSNum = -1;
sp->rtfSType = rtfParStyle;
--
1.5.6
More information about the wine-patches
mailing list