From fd261d7300a25e4f4de9e2016147ee686d455f29 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Tue, 13 Dec 2011 19:55:27 +0100 Subject: [PATCH] * grub-core/kern/misc.c (grub_vsnprintf_real): Fix fmt2 parsing. --- ChangeLog | 4 ++++ grub-core/kern/misc.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7ea8d1001..53d151b62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-12-13 Vladimir Serbinenko + + * grub-core/kern/misc.c (grub_vsnprintf_real): Fix fmt2 parsing. + 2011-12-13 Vladimir Serbinenko * grub-core/commands/videotest.c (grub_cmd_videotest): Check that diff --git a/grub-core/kern/misc.c b/grub-core/kern/misc.c index 128139dc8..0d2ae4bd6 100644 --- a/grub-core/kern/misc.c +++ b/grub-core/kern/misc.c @@ -749,6 +749,12 @@ grub_vsnprintf_real (char *str, grub_size_t max_len, const char *fmt0, va_list a while (*fmt && grub_isdigit (*fmt)) fmt++; + if (*fmt && *fmt =='.') + fmt++; + + while (*fmt && grub_isdigit (*fmt)) + fmt++; + p = fmt; if (*fmt && *fmt == '$')