lkml.org 
[lkml]   [2009]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] vsprintf: introduce %pf
From
Date
On Wed, 2009-04-15 at 02:00 +0200, Frederic Weisbecker wrote:
> diff --git a/lib/vsprintf.c b/lib/vsprintf.c
> index b56f6d0..15c9094 100644
> --- a/lib/vsprintf.c
> +++ b/lib/vsprintf.c
> @@ -575,12 +575,15 @@ static char *string(char *buf, char *end, char *s, struct printf_spec spec)
> }
>
> static char *symbol_string(char *buf, char *end, void *ptr,
> - struct printf_spec spec)
> + struct printf_spec spec, char ext)
> {
> unsigned long value = (unsigned long) ptr;
> #ifdef CONFIG_KALLSYMS
> char sym[KSYM_SYMBOL_LEN];
> - sprint_symbol(sym, value);
> + if (ext != 'f')
> + sprint_symbol(sym, value);
> + else
> + kallsyms_lookup(value, NULL, NULL, NULL, sym);

buffer overflow waiting to happen yes?




\
 
 \ /
  Last update: 2009-04-15 02:13    [W:0.122 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site