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: <CAMuHMdXmqANSaciMtPad4Q6k-i9LXGO1O8Q36bEB0r+vhp9fCA@mail.gmail.com>
Date:   Sat, 10 Feb 2018 19:31:54 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc:     Willy Tarreau <w@....eu>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Robert Abel <rabel@...ertabel.eu>
Subject: Re: [PATCH 1/3] auxdisplay: charlcd: fix hex literal ranges for
 graphics command

On Sat, Feb 10, 2018 at 9:58 AM, Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
> On Sat, Feb 10, 2018 at 12:50 AM, Robert Abel <rabel@...ertabel.eu> wrote:
>> The graphics command expects 16 hexadecimal literals, but would allow characters in range [0-9a-zA-Z] instead of [0-9a-fA-F].
>>
>> Signed-off-by: Robert Abel <rabel@...ertabel.eu>

Reviewed-by: Geert Uytterhoeven <geert@...ux-m68k.org>

>> --- a/drivers/auxdisplay/charlcd.c
>> +++ b/drivers/auxdisplay/charlcd.c
>> @@ -441,9 +441,9 @@ static inline int handle_lcd_special_code(struct charlcd *lcd)
>>                         shift ^= 4;
>>                         if (*esc >= '0' && *esc <= '9') {
>>                                 value |= (*esc - '0') << shift;
>> -                       } else if (*esc >= 'A' && *esc <= 'Z') {
>> +                       } else if (*esc >= 'A' && *esc <= 'F') {
>>                                 value |= (*esc - 'A' + 10) << shift;
>> -                       } else if (*esc >= 'a' && *esc <= 'z') {
>> +                       } else if (*esc >= 'a' && *esc <= 'f') {
>
> Willy, Geert: this seems obvious, but do you know if the broader range
> was intended for some reason? In that case, adding a comment to the
> code would be good. I found some related docs at
> Documentation/misc-devices/lcd-panel-cgram.txt by Willy (which, by the
> way, maybe now we should move them to Documentations/auxdisplay); but
> the paragraph does indeed say they have to be hex:
>
> '''
> Some LCDs allow you to define up to 8 characters, mapped to ASCII
> characters 0 to 7. The escape code to define a new character is
> '\e[LG' followed by one digit from 0 to 7, representing the character
> number, and up to 8 couples of hex digits terminated by a semi-colon
> (';').
> '''

Hadn't noticed this before. Probably a stupid thinko, as Willy said.

The redefinition feature definitely works with hex characters.
I've used it in the past, cfr. the picture on my Google+ profile ;-)
https://plus.google.com/u/0/+GeertUytterhoeven

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ