diff --git a/ChangeLog b/ChangeLog index bc44f7ebf..72066dc5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-29 Andreas Vogel + + * grub-core/kern/misc.c (grub_xvasprintf): Fix an exit path which + resulted in leak of arguments. + 2012-02-29 Vladimir Serbinenko * grub-core/boot/i386/pc/startup_raw.S: Use separate diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c index ad67ed257..164fd6e30 100644 --- a/grub-core/kern/misc.c +++ b/grub-core/kern/misc.c @@ -1060,11 +1060,12 @@ grub_xvasprintf (const char *fmt, va_list ap) while (1) { va_list ap2; - va_copy (ap2, ap); ret = grub_malloc (as + 1); if (!ret) return NULL; + va_copy (ap2, ap); + s = grub_vsnprintf_real (ret, as, fmt, ap2); va_end (ap2);