[glib] GDBusMessage: Properly check error and bail if set



commit 57dff1e06011347cc11492a36dc187cbcf5eece8
Author: David Zeuthen <davidz redhat com>
Date:   Thu Jun 17 16:02:24 2010 -0400

    GDBusMessage: Properly check error and bail if set
    
    Otherwise we may set a GError on top of it.
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 gio/gdbusmessage.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
index 2c2a832..18833c8 100644
--- a/gio/gdbusmessage.c
+++ b/gio/gdbusmessage.c
@@ -970,6 +970,8 @@ parse_value_from_blob (GMemoryInputStream    *mis,
       if (!ensure_input_padding (mis, 4, &local_error))
         goto fail;
       array_len = g_data_input_stream_read_uint32 (dis, NULL, &local_error);
+      if (local_error != NULL)
+        goto fail;
 
       if (array_len > (2<<26))
         {



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