Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion THIRD_PARTY_README
Original file line number Diff line number Diff line change
Expand Up @@ -2381,7 +2381,7 @@ licenses.

-------------------------------------------------------------------------------

%% This notice is provided with respect to GIFLIB 6.1.1 & libungif 4.1.3,
%% This notice is provided with respect to GIFLIB 6.1.2 & libungif 4.1.3,
which may be included with JRE 8, JDK 8, and OpenJDK 8.

--- begin of LICENSE ---
Expand Down
2 changes: 1 addition & 1 deletion jdk/src/share/native/sun/awt/giflib/gif_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extern "C" {

#define GIFLIB_MAJOR 6
#define GIFLIB_MINOR 1
#define GIFLIB_RELEASE 1
#define GIFLIB_RELEASE 2

#define GIF_ERROR 0
#define GIF_OK 1
Expand Down
8 changes: 8 additions & 0 deletions jdk/src/share/native/sun/awt/giflib/gifalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,14 @@ SavedImage *GifMakeSavedImage(GifFileType *GifFile,
* aliasing problems.
*/

/* Null out aliased pointers before any allocations
* so that FreeLastSavedImage won't free CopyFrom's
* data if an allocation fails partway through. */
sp->ImageDesc.ColorMap = NULL;
sp->RasterBits = NULL;
sp->ExtensionBlocks = NULL;
sp->ExtensionBlockCount = 0;

/* first, the local color map */
if (CopyFrom->ImageDesc.ColorMap != NULL) {
sp->ImageDesc.ColorMap = GifMakeMapObject(
Expand Down