Marcus Meissner : gdiplus: do not memcpy over NULL ptrs (Coverity).
Module: wine Branch: master Commit: e70e1249c31103af5779ca0928dca9332f8262da URL: http://source.winehq.org/git/wine.git/?a=commit;h=e70e1249c31103af5779ca0928... Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Sun Sep 20 18:48:39 2009 +0200 gdiplus: do not memcpy over NULL ptrs (Coverity). --- dlls/gdiplus/image.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index f71bf9a..3dc41b8 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -413,8 +413,7 @@ GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage) GdipDisposeImage(*cloneImage); *cloneImage = NULL; } - - memcpy(&(*cloneImage)->format, &image->format, sizeof(GUID)); + else memcpy(&(*cloneImage)->format, &image->format, sizeof(GUID)); return stat; }
participants (1)
-
Alexandre Julliard