Ensure VIPS_CODING_ERROR is handled for vips images (#2420)

This commit is contained in:
Lovell Fuller 2021-08-29 20:16:31 +01:00 committed by John Cupitt
parent 451cfcd282
commit 4aaed60573
1 changed files with 5 additions and 0 deletions

View File

@ -400,6 +400,11 @@ vips__read_header_bytes( VipsImage *im, unsigned char *from )
* are sane.
*/
switch( im->Coding ) {
case VIPS_CODING_ERROR:
vips_error( "VipsImage",
"%s", _( "unknown coding" ) );
return( -1 );
case VIPS_CODING_NONE:
break;