summaryrefslogtreecommitdiffstats
path: root/patches/fbv-1.0b/generic/fbv-1.0b-may-be-uninitialized.diff
blob: 8d432019dbfd8d5cb490feb8e666b675f35153c4 (plain)
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
27
28
29
30
31
---
 main.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Index: fbv-1.0b/main.c
===================================================================
--- fbv-1.0b.orig/main.c
+++ fbv-1.0b/main.c
@@ -201,13 +201,21 @@ int show_image(char *filename)
 	unsigned char * alpha = NULL;
 	
 	int x_size, y_size, screen_width, screen_height;
-	int x_pan, y_pan, x_offs, y_offs, refresh = 1, c, ret = 1;
+	int x_pan = 0;
+	int y_pan = 0;
+	int x_offs = 0;
+	int y_offs = 0;
+	int refresh = 1;
+	int c;
+	int ret = 1;
 	int delay = opt_delay, retransform = 1;
 	
 	int transform_stretch = opt_stretch, transform_enlarge = opt_enlarge, transform_cal = (opt_stretch == 2),
 	    transform_iaspect = opt_ignore_aspect, transform_rotation = 0;
 	
 	struct image i;
+
+	memset(&i, 0, sizeof(struct image));
 	
 #ifdef FBV_SUPPORT_GIF
 	if(fh_gif_id(filename))