[glib/fix-mkenums-genmarshal-test-windows: 1/3] Avoid overrunning stack at the end of the varargs.
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/fix-mkenums-genmarshal-test-windows: 1/3] Avoid overrunning stack at the end of the varargs.
- Date: Mon, 24 Jun 2019 15:55:42 +0000 (UTC)
commit bcc2a622b5cb6ecd488e9290c2a19b7fa56f3fdf
Author: John Ralls <jralls ceridwen us>
Date: Thu Jun 20 16:07:01 2019 -0700
Avoid overrunning stack at the end of the varargs.
glib/gmarkup.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/glib/gmarkup.c b/glib/gmarkup.c
index 8a4e943eb..5b70cef8d 100644
--- a/glib/gmarkup.c
+++ b/glib/gmarkup.c
@@ -2872,9 +2872,10 @@ g_markup_collect_attributes (const gchar *element_name,
g_assert_not_reached ();
}
- type = va_arg (ap, GMarkupCollectType);
- attr = va_arg (ap, const char *);
written++;
+ type = va_arg (ap, GMarkupCollectType);
+ if (type != G_MARKUP_COLLECT_INVALID)
+ attr = va_arg (ap, const char *);
}
va_end (ap);
@@ -2950,7 +2951,8 @@ failure:
}
type = va_arg (ap, GMarkupCollectType);
- attr = va_arg (ap, const char *);
+ if (type != G_MARKUP_COLLECT_INVALID)
+ attr = va_arg (ap, const char *);
}
va_end (ap);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]