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: <1455705906.4745.13.camel@perches.com>
Date:	Wed, 17 Feb 2016 02:45:06 -0800
From:	Joe Perches <joe@...ches.com>
To:	Tomas Winkler <tomas.winkler@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Alexander Usyskin <alexander.usyskin@...el.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [char-misc-next] mei: fix format string in debug prints

On Wed, 2016-02-17 at 12:27 +0200, Tomas Winkler wrote:
[]
> buf_idx type was changed to size_t, and few places
> missed out to change the print format from %ld to %zd.

trivia:

> diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
[]
> @@ -128,7 +128,7 @@ int mei_cl_irq_read_msg(struct mei_cl *cl,
>  	buf_sz = mei_hdr->length + cb->buf_idx;
>  	/* catch for integer overflow */
>  	if (buf_sz < cb->buf_idx) {
> -		cl_err(dev, cl, "message is too big len %d idx %ld\n",
> +		cl_err(dev, cl, "message is too big len %d idx %zd\n",
>  		       mei_hdr->length, cb->buf_idx);

[etc...]

buf_idx is size_t and it should probably use %zu

ssize_t -> %zd
size_t -> %zu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ