8040113: File not initialized in src/share/native/sun/awt/giflib/dgif_lib.c
Reviewed-by: pchelko, prr
--- 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;