diff --git a/ChangeLog b/ChangeLog index b7fad021..925eb6ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,7 @@ - fix sharpen with sigma 0.5 [2h4dl] - sharpen restores input colourspace - verify bands/format for coded images +- improve data_length handling for jpeg metadata 24/5/19 started 8.8.1 - improve realpath() use on older libc diff --git a/libvips/foreign/jpeg2vips.c b/libvips/foreign/jpeg2vips.c index 1060bc9e..d4af258f 100644 --- a/libvips/foreign/jpeg2vips.c +++ b/libvips/foreign/jpeg2vips.c @@ -307,7 +307,7 @@ find_chroma_subsample( struct jpeg_decompress_struct *cinfo ) } static int -attach_blob( VipsImage *im, const char *field, void *data, int data_length ) +attach_blob( VipsImage *im, const char *field, void *data, size_t data_length ) { /* Only use the first one. */ @@ -333,7 +333,7 @@ attach_blob( VipsImage *im, const char *field, void *data, int data_length ) * the real XMP. */ static int -attach_xmp_blob( VipsImage *im, void *data, int data_length ) +attach_xmp_blob( VipsImage *im, void *data, size_t data_length ) { char *p = (char *) data; int i; @@ -496,7 +496,7 @@ read_jpeg_header( ReadJpeg *jpeg, VipsImage *out ) for( p = cinfo->marker_list; p; p = p->next ) { #ifdef DEBUG { - printf( "read_jpeg_header: seen %d bytes of APP%d\n", + printf( "read_jpeg_header: seen %u bytes of APP%d\n", p->data_length, p->marker - JPEG_APP0 ); @@ -593,7 +593,7 @@ read_jpeg_header( ReadJpeg *jpeg, VipsImage *out ) default: #ifdef DEBUG printf( "read_jpeg_header: " - "ignoring %d byte APP%d block\n", + "ignoring %u byte APP%d block\n", p->data_length, p->marker - JPEG_APP0 ); #endif /*DEBUG*/ break;