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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 19 Mar 2022 13:37:05 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Miguel Ojeda <ojeda@...nel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 4/4] auxdisplay: lcd2s: Use array size explicitly in lcd2s_gotoxy()

On Sat, Mar 19, 2022 at 6:46 AM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
> On Tue, Mar 8, 2022 at 4:11 PM Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> wrote:
> >
> > Currently the reading of the onstack array is confusing since two
> > out of three members are of different types. Let it be more clear
> > by explicitly set the array size, so everybody will understand that
> > parameters are cast to the type of the array.
>
> I am not sure what you mean by this, could you please elaborate why is
> it more clear if the size is given?

With [] and parameters not being bytes by type one needs an additional
processing step to figure that out. When I see u8 ...[3] I immediately
understand that there are 3 _bytes_. Moreover, [] is error prone when
one may add something to the buffer with the expectation that it will
work somehow (for example, with an old device you need 3, with new
device revision you need 4 bytes and passing 4 bytes breaks the old
device). Of course most of that quite likely won't happen.

If you think this change is not worth it, please, drop.


--
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ