changeset 10141:0b3012072c00

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 3112aa051345
children bfa8f331374a
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 May 30 11:20:03 2014 +0400
+++ 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;