changeset 9668:f48a12d2d32f

8040113: File not initialized in src/share/native/sun/awt/giflib/dgif_lib.c Reviewed-by: pchelko, prr
author serb
date Fri, 30 May 2014 14:06:50 +0400
parents 5d30396344f5
children f3841ee10a08
files src/share/native/sun/awt/giflib/dgif_lib.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/awt/giflib/dgif_lib.c	Fri Jun 06 14:23:08 2014 -0700
+++ b/src/share/native/sun/awt/giflib/dgif_lib.c	Fri May 30 14:06:50 2014 +0400
@@ -195,6 +195,11 @@
     GifFileType *GifFile;
     GifFilePrivateType *Private;
 
+    if (!readFunc) {
+        _GifError = D_GIF_ERR_READ_FAILED;
+        return NULL;
+    }
+
     GifFile = (GifFileType *)malloc(sizeof(GifFileType));
     if (GifFile == NULL) {
         _GifError = D_GIF_ERR_NOT_ENOUGH_MEM;