[gtk: 13/31] gtk_css_style_snapshot_icon_paintable: Fix uninitialized memory access
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 13/31] gtk_css_style_snapshot_icon_paintable: Fix uninitialized memory access
- Date: Mon, 10 Feb 2020 12:47:52 +0000 (UTC)
commit fcc3c1291970f115315e24a9281ad3ac94388a12
Author: Alexander Larsson <alexl redhat com>
Date: Thu Feb 6 16:23:11 2020 +0100
gtk_css_style_snapshot_icon_paintable: Fix uninitialized memory access
We were reading the foreground color alpha even when we didn't read it.
gtk/gtkrendericon.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkrendericon.c b/gtk/gtkrendericon.c
index ddb889642c..a434c73010 100644
--- a/gtk/gtkrendericon.c
+++ b/gtk/gtkrendericon.c
@@ -114,10 +114,12 @@ gtk_css_style_snapshot_icon_paintable (GtkCssStyle *style,
is_icon_paintable = GTK_IS_ICON_PAINTABLE (paintable);
if (is_icon_paintable)
- gtk_icon_theme_lookup_symbolic_colors (style, &fg, &sc, &wc, &ec);
+ {
+ gtk_icon_theme_lookup_symbolic_colors (style, &fg, &sc, &wc, &ec);
- if (fg.alpha == 0.0f)
- goto transparent;
+ if (fg.alpha == 0.0f)
+ goto transparent;
+ }
if (transform == NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]