Commit 605a40e4 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

riched20: Handle NULL fp more gracefully (Coverity).

parent 9eb4c73a
......@@ -871,8 +871,10 @@ static void ReadFontTbl(RTF_Info *info)
break;
}
fp = New (RTFFont);
if (fp == NULL)
if (fp == NULL) {
ERR ( "%s: cannot allocate font entry\n", fn);
break;
}
fp->rtfNextFont = info->fontList;
info->fontList = fp;
......@@ -992,7 +994,7 @@ static void ReadFontTbl(RTF_Info *info)
TRACE("default font codepage %d\n", info->codePage);
}
}
if (fp->rtfFNum == -1)
if (!fp || (fp->rtfFNum == -1))
ERR( "%s: missing font number\n", fn);
/*
* Could check other pieces of structure here, too, I suppose.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment