]> Pileus Git - ~andy/gtk/commitdiff
Prevent overflow when storing size hints in an unsigned short variable.
authorMatthias Clasen <mclasen@redhat.com>
Fri, 30 Sep 2005 14:57:02 +0000 (14:57 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 30 Sep 2005 14:57:02 +0000 (14:57 +0000)
2005-09-30  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtksocket-x11.c (_gtk_socket_windowing_size_request):
        Prevent overflow when storing size hints in an unsigned
        short variable. Tracked down by Ray Strode and Søren Sandmann.

ChangeLog
ChangeLog.pre-2-10
gtk/gtksocket-x11.c

index 8190ac9d9c944b9c5e577d69bde2c4b875d79976..e5c9326c86d60c77f8266b1b9139daaa24ff90af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-30  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtksocket-x11.c (_gtk_socket_windowing_size_request):
+       Prevent overflow when storing size hints in an unsigned
+       short variable. Tracked down by Ray Strode and Søren Sandmann.
+
 2005-09-29  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkbutton.c (gtk_button_set_image): Check arguments.  (#317491,
@@ -310,7 +316,8 @@ Thu Sep 15 15:27:55 2005  Tim Janik  <timj@imendio.com>
 
 2005-09-14  Tristan Van Berkom <tvb@cvs.gnome.org>
 
-       * gtk/gtkcolorbutton.c: Check "color" argument in gtk_color_button_set_color ()
+       * gtk/gtkcolorbutton.c: Check "color" argument in 
+       gtk_color_button_set_color ()
 
 2005-09-14  Matthias Clasen  <mclasen@redhat.com>
 
index 8190ac9d9c944b9c5e577d69bde2c4b875d79976..e5c9326c86d60c77f8266b1b9139daaa24ff90af 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-30  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtksocket-x11.c (_gtk_socket_windowing_size_request):
+       Prevent overflow when storing size hints in an unsigned
+       short variable. Tracked down by Ray Strode and Søren Sandmann.
+
 2005-09-29  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkbutton.c (gtk_button_set_image): Check arguments.  (#317491,
@@ -310,7 +316,8 @@ Thu Sep 15 15:27:55 2005  Tim Janik  <timj@imendio.com>
 
 2005-09-14  Tristan Van Berkom <tvb@cvs.gnome.org>
 
-       * gtk/gtkcolorbutton.c: Check "color" argument in gtk_color_button_set_color ()
+       * gtk/gtkcolorbutton.c: Check "color" argument in 
+       gtk_color_button_set_color ()
 
 2005-09-14  Matthias Clasen  <mclasen@redhat.com>
 
index 0470a7c8960d16021d257e5d328afd11fa033c37..9554d67ffcc0b50618f9688aa27354895e4171ed 100644 (file)
@@ -101,13 +101,13 @@ _gtk_socket_windowing_size_request (GtkSocket *socket)
     {
       if (hints.flags & PMinSize)
        {
-         socket->request_width = hints.min_width;
-         socket->request_height = hints.min_height;
+         socket->request_width = MAX (hints.min_width, 1);
+         socket->request_height = MAX (hints.min_height, 1);
        }
       else if (hints.flags & PBaseSize)
        {
-         socket->request_width = hints.base_width;
-         socket->request_height = hints.base_height;
+         socket->request_width = MAX (hints.base_width, 1);
+         socket->request_height = MAX (hints.base_height, 1);
        }
     }
   socket->have_size = TRUE;