Package: vips / 8.7.4-1+deb10u1

fix-used-before-set_error-in-im_vips2dz.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 2ab5aa7bf515135c2b02d42e9a72e4c98e17031a Mon Sep 17 00:00:00 2001
From: John Cupitt <jcupitt@gmail.com>
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 6dbde78c3..aafe8f99d 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];