fix error detection from DGifCloseFile()

we were not testing the return from `DGifCloseFile()` against `GIF_ERROR`,
causing spurious error reports

see https://github.com/jcupitt/libvips/issues/541
This commit is contained in:
John Cupitt 2016-10-18 14:09:18 +01:00
parent 6a6c8cc5dd
commit d785e56372
3 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,6 @@
18/10/16 started 8.4.3
- fix error detection in gif_close, thanks aaron42net
27/9/16 started 8.4.2
- small doc improvements
- fix error message for metadata fetch type mismatch

View File

@ -2,7 +2,7 @@
# also update the version number in the m4 macros below
AC_INIT([vips], [8.4.2], [vipsip@jiscmail.ac.uk])
AC_INIT([vips], [8.4.3], [vipsip@jiscmail.ac.uk])
# required for gobject-introspection
AC_PREREQ(2.62)
@ -18,7 +18,7 @@ AC_CONFIG_MACRO_DIR([m4])
# user-visible library versioning
m4_define([vips_major_version], [8])
m4_define([vips_minor_version], [4])
m4_define([vips_micro_version], [2])
m4_define([vips_micro_version], [3])
m4_define([vips_version],
[vips_major_version.vips_minor_version.vips_micro_version])
@ -38,7 +38,7 @@ VIPS_VERSION_STRING=$VIPS_VERSION-`date`
# binary interface changes not backwards compatible?: reset age to 0
LIBRARY_CURRENT=48
LIBRARY_REVISION=2
LIBRARY_REVISION=3
LIBRARY_AGE=6
# patched into include/vips/version.h

View File

@ -208,13 +208,13 @@ vips_foreign_load_gif_close( VipsForeignLoadGif *gif )
if( gif->file ) {
int error;
if( DGifCloseFile( gif->file, &error ) )
if( DGifCloseFile( gif->file, &error ) == GIF_ERROR )
vips_foreign_load_gif_error_vips( gif, error );
gif->file = NULL;
}
#else
if( gif->file ) {
if( DGifCloseFile( gif->file ) )
if( DGifCloseFile( gif->file ) == GIF_ERROR )
vips_foreign_load_gif_error_vips( gif, GifLastError() );
gif->file = NULL;
}