8040113: File not initialized in src/share/native/sun/awt/giflib/dgif_lib.c
authorserb
Fri, 30 May 2014 14:06:50 +0400
changeset 25116 6e5ed7c4ff79
parent 25115 8b780f13a8d4
child 25117 e0d045874774
8040113: File not initialized in src/share/native/sun/awt/giflib/dgif_lib.c Reviewed-by: pchelko, prr
jdk/src/share/native/sun/awt/giflib/dgif_lib.c
--- a/jdk/src/share/native/sun/awt/giflib/dgif_lib.c	Fri May 30 11:20:03 2014 +0400
+++ b/jdk/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;