lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090327125345.GF5976@nowhere>
Date:	Fri, 27 Mar 2009 13:53:45 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Zhaolei <zhaolei@...fujitsu.com>
Cc:	Lai Jiangshan <laijs@...fujitsu.com>, Ingo Molnar <mingo@...e.hu>,
	torvalds@...ux-foundation.org,
	Steven Rostedt <rostedt@...dmis.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] Fix wrong format string iter for printk

On Fri, Mar 27, 2009 at 05:09:10PM +0800, Zhaolei wrote:
> printk("%Q");
> Output before patch:
> %QQ
> Output after patch:
> %Q
> 
> Signed-off-by: Zhao Lei <zhaolei@...fujitsu.com>
> ---
>  lib/vsprintf.c |   16 ----------------
>  1 files changed, 0 insertions(+), 16 deletions(-)
> 
> diff --git a/lib/vsprintf.c b/lib/vsprintf.c
> index 908dd41..b56f6d0 100644
> --- a/lib/vsprintf.c
> +++ b/lib/vsprintf.c
> @@ -1062,13 +1062,6 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
>  			if (str < end)
>  				*str = '%';
>  			++str;
> -			if (*fmt) {
> -				if (str < end)
> -					*str = *fmt;
> -				++str;
> -			} else {
> -				--fmt;
> -			}
>  			break;
>  
>  		case FORMAT_TYPE_NRCHARS: {
> @@ -1356,8 +1349,6 @@ do {									\
>  			break;
>  
>  		case FORMAT_TYPE_INVALID:
> -			if (!*fmt)
> -				--fmt;
>  			break;
>  
>  		case FORMAT_TYPE_NRCHARS: {
> @@ -1544,13 +1535,6 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf)
>  			if (str < end)
>  				*str = '%';
>  			++str;
> -			if (*fmt) {
> -				if (str < end)
> -					*str = *fmt;
> -				++str;
> -			} else {
> -				--fmt;
> -			}
>  			break;
>  
>  		case FORMAT_TYPE_NRCHARS:
> -- 
> 1.5.5.3
> 
> 


Thanks for fixing this!

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ