fix a used-before-set error in im_vips2dz

we were reading an uninited string in a vips7 compatibility wrapper, thanks
yifengchen-cc

see https://github.com/libvips/libvips/issues/1419
This commit is contained in:
John Cupitt 2019-09-03 13:17:18 +01:00
parent 8ddbfbaf0c
commit 2ab5aa7bf5

View File

@ -75,6 +75,8 @@ im_vips2dz( IMAGE *in, const char *filename )
*p = '\0';
im_strncpy( mode, p + 1, FILENAME_MAX );
}
else
strcpy( mode, "" );
strcpy( buf, mode );
p = &buf[0];