Thread (47 messages) 47 messages, 13 authors, 2017-07-18

Re: [PATCH 17/22] platform/x86: alienware-wmi: fix format string overflow warning

From: Andy Shevchenko <hidden>
Date: 2017-07-14 19:49:48
Also in: linux-scsi, lkml, platform-driver-x86

On Fri, Jul 14, 2017 at 10:37 PM, Arnd Bergmann [off-list ref] wrote:
On Fri, Jul 14, 2017 at 9:18 PM, Andy Shevchenko
[off-list ref] wrote:
quoted
On Fri, Jul 14, 2017 at 3:07 PM, Arnd Bergmann [off-list ref] wrote:
quoted
gcc points out a possible format string overflow for a large value of 'zone':
quoted
Here we need to convert

int i;

to

u8 i;
That was my first impulse, but then I decided not to change the
idiomatic 'int i' for the index variable to 'u8' as that would be
less idiomatic.
quoted
I will take it after addressing above.

P.S. You may do this change across the file.
How about changing it to 'u8 zone'?
I'm ultimately fine with that (just gentle reminder you might fix all
3 occurrences of it in that driver).

-- 
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help