Merge branch '8.5'

This commit is contained in:
John Cupitt 2017-08-29 10:33:45 +01:00
commit 2b70348d23
2 changed files with 24 additions and 4 deletions

View File

@ -15,6 +15,9 @@
- `join` tagged as seq - `join` tagged as seq
- support tiffsave_buffer for pyramids, thanks bubba - support tiffsave_buffer for pyramids, thanks bubba
29/8/17 started 8.5.9
- make --fail stop jpeg read on any libjpeg warning, thanks @mceachen
2/8/17 started 8.5.8 2/8/17 started 8.5.8
- fix transparency detection in merge, thanks Haida - fix transparency detection in merge, thanks Haida
- define env var VIPS_WARNING to hide warning messages - define env var VIPS_WARNING to hide warning messages

View File

@ -90,6 +90,10 @@
* 25/8/17 * 25/8/17
* - revise read from buffer functions in line with latest libjpeg * - revise read from buffer functions in line with latest libjpeg
* recommendations -- fixes a segv with crafted jpeg images * recommendations -- fixes a segv with crafted jpeg images
* 29/8/17
* - revert previous warning change: libvips reports serious corruption,
* like a truncated file, as a warning and we need to be able to catch
* that
*/ */
/* /*
@ -153,7 +157,7 @@ typedef struct _ReadJpeg {
*/ */
int shrink; int shrink;
/* Fail on errors. /* Fail on warning.
*/ */
gboolean fail; gboolean fail;
@ -574,10 +578,23 @@ read_jpeg_generate( VipsRegion *or,
printf( "read_jpeg_generate: lonjmp() exit\n" ); printf( "read_jpeg_generate: lonjmp() exit\n" );
#endif /*DEBUG*/ #endif /*DEBUG*/
if( jpeg->fail ) return( -1 );
return( -1 ); }
return( 0 ); /* If --fail is set, we make read fail on any warnings. This
* will stop on any errors from the previous jpeg_read_scanlines().
* libjpeg warnings are used for serious image corruption, like
* truncated files.
*/
if( jpeg->eman.pub.num_warnings > 0 &&
jpeg->fail ) {
VIPS_GATE_STOP( "read_jpeg_generate: work" );
/* Only fail once.
*/
jpeg->eman.pub.num_warnings = 0;
return( -1 );
} }
for( y = 0; y < r->height; y++ ) { for( y = 0; y < r->height; y++ ) {