From 899d8af498bcfe987c59733b3d530011e4ea49e9 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 20 Sep 2010 19:14:29 +0200 Subject: [PATCH] * grub-core/kern/emu/misc.c (asprintf): Use vsnprintf instead of vsprintf. --- ChangeLog | 5 +++++ grub-core/kern/emu/misc.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ae98382fa..c2239c5ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-09-20 Vladimir Serbinenko + + * grub-core/kern/emu/misc.c (asprintf): Use vsnprintf instead of + vsprintf. + 2010-09-20 Colin Watson * grub-core/commands/efi/lsefimmap.c: Correct header. diff --git a/grub-core/kern/emu/misc.c b/grub-core/kern/emu/misc.c index 4630d335d..d8db3be9d 100644 --- a/grub-core/kern/emu/misc.c +++ b/grub-core/kern/emu/misc.c @@ -161,7 +161,7 @@ vasprintf (char **buf, const char *fmt, va_list ap) /* Should be large enough. */ *buf = xmalloc (512); - return vsprintf (*buf, fmt, ap); + return vsnprintf (*buf, 512, fmt, ap); } #endif