After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 662248 - Don't leave va_args dangling
Don't leave va_args dangling
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: at-spi2-atk
unspecified
Other All
: Normal normal
: ---
Assigned To: Li Yuan
Depends on:
Blocks:
 
 
Reported: 2011-10-19 22:45 UTC by Matthias Clasen
Modified: 2011-10-20 10:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't leave va_args dangling (1.01 KB, patch)
2011-10-19 22:45 UTC, Matthias Clasen
accepted-commit_now Details | Review
Don't leave va_args dangling (1.01 KB, patch)
2011-10-20 10:25 UTC, Matthias Clasen
committed Details | Review

Description Matthias Clasen 2011-10-19 22:45:08 UTC
spi_dbus_message_iter_append_struct has an early exit where it
forgets to call va_end(). Harmless most of the time, but it
upsets static analyzers.
Comment 1 Matthias Clasen 2011-10-19 22:45:09 UTC
Created attachment 199488 [details] [review]
Don't leave va_args dangling
Comment 2 Mike Gorse 2011-10-19 23:58:21 UTC
Comment on attachment 199488 [details] [review]
Don't leave va_args dangling

Okay; go ahead and commit.




>From e648f8220905b17632f7d4b2f16deac1b0aff7d0 Mon Sep 17 00:00:00 2001
>From: Matthias Clasen <mclasen@redhat.com>
>Date: Wed, 19 Oct 2011 18:42:18 -0400
>Subject: [PATCH] Don't leave va_args dangling
>
>spi_dbus_message_iter_append_struct has an early exit where it
>forgets to call va_end(). Harmless most of the time, but it
>upsets static analyzers.
>
>https://bugzilla.gnome.org/show_bug.cgi?id=662248
>---
> atk-adaptor/spi-dbus.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/atk-adaptor/spi-dbus.c b/atk-adaptor/spi-dbus.c
>index b448510..e4fa49a 100644
>--- a/atk-adaptor/spi-dbus.c
>+++ b/atk-adaptor/spi-dbus.c
>@@ -125,8 +125,8 @@ dbus_bool_t spi_dbus_message_iter_append_struct(DBusMessageIter *iter, ...)
>     ptr = va_arg(args, void *);
>     dbus_message_iter_append_basic(&iter_struct, type, ptr);
>   }
>-  if (!dbus_message_iter_close_container(iter, &iter_struct)) return FALSE;
>   va_end(args);
>+  if (!dbus_message_iter_close_container(iter, &iter_struct)) return FALSE;
>   return TRUE;
> }
> 
>-- 
>1.7.6.4
Comment 3 Matthias Clasen 2011-10-20 10:25:17 UTC
The following fix has been pushed:
e648f82 Don't leave va_args dangling
Comment 4 Matthias Clasen 2011-10-20 10:25:19 UTC
Created attachment 199511 [details] [review]
Don't leave va_args dangling

spi_dbus_message_iter_append_struct has an early exit where it
forgets to call va_end(). Harmless most of the time, but it
upsets static analyzers.