From 2ab5aa7bf515135c2b02d42e9a72e4c98e17031a Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 3 Sep 2019 13:17:18 +0100 Subject: [PATCH] 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 --- libvips/deprecated/im_vips2dz.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvips/deprecated/im_vips2dz.c b/libvips/deprecated/im_vips2dz.c index 6dbde78c..aafe8f99 100644 --- a/libvips/deprecated/im_vips2dz.c +++ b/libvips/deprecated/im_vips2dz.c @@ -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];