Commit a09621b0 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

riched20: Handle more missing allocs gracefully (Coverity).

parent 605a40e4
...@@ -219,8 +219,10 @@ void RTFInit(RTF_Info *info) ...@@ -219,8 +219,10 @@ void RTFInit(RTF_Info *info)
{ {
info->rtfTextBuf = heap_alloc (rtfBufSiz); info->rtfTextBuf = heap_alloc (rtfBufSiz);
info->pushedTextBuf = heap_alloc (rtfBufSiz); info->pushedTextBuf = heap_alloc (rtfBufSiz);
if (info->rtfTextBuf == NULL || info->pushedTextBuf == NULL) if (info->rtfTextBuf == NULL || info->pushedTextBuf == NULL) {
ERR ("Cannot allocate text buffers.\n"); ERR ("Cannot allocate text buffers.\n");
return;
}
info->rtfTextBuf[0] = info->pushedTextBuf[0] = '\0'; info->rtfTextBuf[0] = info->pushedTextBuf[0] = '\0';
} }
......
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