printf: fix invalid memory access in case of %%

https://bugzilla.gnome.org/show_bug.cgi?id=748414
This commit is contained in:
Tim-Philipp Müller 2015-04-24 15:16:24 +01:00
parent cde5a6fea3
commit 6c394643be

View file

@ -239,6 +239,11 @@ printf_postprocess_args (char_directives * directives, arguments * arguments)
argument *a;
dp = &directives->dir[i];
/* %% has no arguments, for example */
if (dp->arg_index < 0)
continue;
a = &arguments->arg[dp->arg_index];
if (a->type == TYPE_POINTER_EXT) {