[at-spi2-core] Fix crash in atspi_image_get_image_description



commit 14d50e60b43a7c0d529c5b4ba4136abc2058f59e
Author: Dan Winship <danw gnome org>
Date:   Fri Jan 21 11:27:16 2011 -0500

    Fix crash in atspi_image_get_image_description
    
    If the remote object didn't define this property then the function
    would return stack garbage, which the caller would eventually try to
    free.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=640198

 atspi/atspi-image.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/atspi/atspi-image.c b/atspi/atspi-image.c
index 75c3553..1d9a2b5 100644
--- a/atspi/atspi-image.c
+++ b/atspi/atspi-image.c
@@ -34,7 +34,7 @@
 gchar *
 atspi_image_get_image_description (AtspiImage *obj, GError **error)
 {
-  char *retval;
+  char *retval = NULL;
 
   g_return_val_if_fail (obj != NULL, NULL);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]