summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-06-30 19:11:58 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-06-30 19:11:58 +0000
commit8833e0d3c3798264372ef8403f1379e7a5954cc0 (patch)
tree59d2c3fe11606d8b98fa2898bc3f5fe6b3faceb2
parent58824aa9bb80cdd9a4f27968781ec73406e878a4 (diff)
downloadgdk-pixbuf-8833e0d3c3798264372ef8403f1379e7a5954cc0.tar.gz
Avoid infinite loop if a mask is zero. (#309222, David Saxton)
2005-06-30 Matthias Clasen <mclasen@redhat.com> * gdk/x11/gdkvisual-x11.c (gdk_visual_decompose_mask): Avoid infinite loop if a mask is zero. (#309222, David Saxton)
-rw-r--r--ChangeLog3
-rw-r--r--ChangeLog.pre-2-103
-rw-r--r--ChangeLog.pre-2-83
-rw-r--r--gdk/x11/gdkvisual-x11.c6
4 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 385763a09..2ac66d0ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2005-06-30 Matthias Clasen <mclasen@redhat.com>
+ * gdk/x11/gdkvisual-x11.c (gdk_visual_decompose_mask): Avoid
+ infinite loop if a mask is zero. (#309222, David Saxton)
+
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_fetch_child):
Clarify the code, gcc 4 complains about predecrement in MAX().
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 385763a09..2ac66d0ef 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,5 +1,8 @@
2005-06-30 Matthias Clasen <mclasen@redhat.com>
+ * gdk/x11/gdkvisual-x11.c (gdk_visual_decompose_mask): Avoid
+ infinite loop if a mask is zero. (#309222, David Saxton)
+
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_fetch_child):
Clarify the code, gcc 4 complains about predecrement in MAX().
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 385763a09..2ac66d0ef 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,5 +1,8 @@
2005-06-30 Matthias Clasen <mclasen@redhat.com>
+ * gdk/x11/gdkvisual-x11.c (gdk_visual_decompose_mask): Avoid
+ infinite loop if a mask is zero. (#309222, David Saxton)
+
* gtk/gtktreemodelfilter.c (gtk_tree_model_filter_fetch_child):
Clarify the code, gcc 4 complains about predecrement in MAX().
diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
index 94d3687a1..b79640798 100644
--- a/gdk/x11/gdkvisual-x11.c
+++ b/gdk/x11/gdkvisual-x11.c
@@ -618,6 +618,12 @@ gdk_visual_decompose_mask (gulong mask,
*shift = 0;
*prec = 0;
+ if (mask == 0)
+ {
+ g_warning ("Mask is 0 in visual. Server bug ?");
+ return;
+ }
+
while (!(mask & 0x1))
{
(*shift)++;