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)
This commit is contained in:
committed by
Matthias Clasen
parent
58824aa9bb
commit
8833e0d3c3
@ -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().
|
||||
|
||||
|
||||
@ -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().
|
||||
|
||||
|
||||
@ -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().
|
||||
|
||||
|
||||
@ -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)++;
|
||||
|
||||
Reference in New Issue
Block a user