nanogui: [patch] devimage.c one-liner


Previous by date: 11 Sep 2000 13:29:34 -0000 About Arm CPU, linuxhh
Next by date: 11 Sep 2000 13:29:34 -0000 mouse not working..., Ritesh Saigal
Previous in thread:
Next in thread:

Subject: [patch] devimage.c one-liner
From: Jamie Guinan ####@####.####
Date: 11 Sep 2000 13:29:34 -0000
Message-Id: <Pine.LNX.4.21.0009110915340.1582-100000@gemini.home.net>

In src/engine/devimage.c:GdLoadImageFromFile(), pimage->transcolor 
is left unitialized, and only LoadGIF() sets it properly.
LoadJPEG() and LoadBMP() do not set it.

This can trigger a segfault in src/engine/devdraw.c:GdDrawImage(), 
where transcolor is used to index the array convtable[].

CVS seems to be down this morning, patch against my most recent
copy follows.

Thanks,
-Jamie


--- src/engine/devimage.c.ori	Mon Sep 11 09:10:47 2000
+++ src/engine/devimage.c	Mon Sep 11 09:11:07 2000
@@ -77,6 +77,7 @@
 	}
 	pimage->imagebits = NULL;
 	pimage->palette = NULL;
+	pimage->transcolor = -1;
 
 #if defined(HAVE_BMP_SUPPORT)
 	if (loadOK == 0) 


Previous by date: 11 Sep 2000 13:29:34 -0000 About Arm CPU, linuxhh
Next by date: 11 Sep 2000 13:29:34 -0000 mouse not working..., Ritesh Saigal
Previous in thread:
Next in thread:


Powered by ezmlm-browse 0.20.