Marcus Meissner : usp10: Check heap_alloc return value (Coverity).

Alexandre Julliard julliard at winehq.org
Mon May 24 11:30:48 CDT 2010


Module: wine
Branch: master
Commit: 163c7021b16dae97f3a5d4a726dd4310865d814e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=163c7021b16dae97f3a5d4a726dd4310865d814e

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Fri May 21 21:11:30 2010 +0200

usp10: Check heap_alloc return value (Coverity).

---

 dlls/usp10/usp10.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 261b634..27fe3b0 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -1378,6 +1378,7 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
     if ((get_cache_pitch_family(psc) & TMPF_TRUETYPE) && !psa->fNoGlyphIndex)
     {
         WCHAR *rChars = heap_alloc(sizeof(WCHAR) * cChars);
+        if (!rChars) return E_OUTOFMEMORY;
         for (i = 0; i < cChars; i++)
         {
             int idx = i;




More information about the wine-cvs mailing list