This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug AWT/18312] New: Component.createImage() doesn't clear bitmap
- From: "sven at physto dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Nov 2004 19:51:44 -0000
- Subject: [Bug AWT/18312] New: Component.createImage() doesn't clear bitmap
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
An image created with Component.createImage() is supposed to be filled with the
default component background gray.
Currently, it simply mallocs the pixmap data without initializing it, which is
also a mild security flaw.
Suggested fix is to do a fillRect() after creating the graphics context in
GtkComponentPeer.java.
An (faster) alternative would be to do a memset in the c method
Java_gnu_java_awt_peer_gtk_GdkGraphics_initState__II.
--
Summary: Component.createImage() doesn't clear bitmap
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: AWT
AssignedTo: fitzsim at redhat dot com
ReportedBy: sven at physto dot se
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18312