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: <ED8A0242-10D3-4280-815F-BB38AB80251D@arm.com>
Date:   Fri, 22 May 2020 15:22:29 +0000
From:   Dave Rodgman <dave.rodgman@....com>
To:     "C. Masloch" <pushbx@...kai.org>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Jonathan Corbet <corbet@....net>, Willy Tarreau <w@....eu>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/2] docs: lzo: fix first byte interpretation off-by-one

Your update looks correct to me, thanks.

Dave

On 22/05/2020, 15:11, "C. Masloch" <pushbx@...kai.org> wrote:

    There was an error in the description of the initial byte's
    interpretation. While "18..21" was listed as  "copy 0..3 literals",
    it should actually be interpreted as "copy 1..4 literals".

    The "byte - 17" part is correct. 17 would encode copying "zero"
    literals, but does not occur. 18 encodes copying 1 literal,
    19 then 2 literals, 20 for 3 literals, 21 for 4 literals.
    The description should read "18..21" as "copy 1..4 literals".
    Likewise, 22 indicates "copying 5 literals", not "4 literals".
    However, the state is indeed always set to "byte - 17" (which
    for 21 results in 4 too).

    Signed-off-by: C. Masloch <pushbx@...kai.org>
    ---
     Documentation/lzo.txt | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)

    diff --git a/Documentation/lzo.txt b/Documentation/lzo.txt
    index ca9833289..f839d104d 100644
    --- a/Documentation/lzo.txt
    +++ b/Documentation/lzo.txt
    @@ -108,12 +108,12 @@ Byte sequences
                     (version 1 only).
                     Otherwise, the bitstream version is 0.

    -      18..21  : copy 0..3 literals
    -                state = (byte - 17) = 0..3  [ copy <state> literals ]
    +      18..21  : copy 1..4 literals
    +                state = (byte - 17) = 1..4  [ copy <state> literals ]
                     skip byte

           22..255 : copy literal string
    -                length = (byte - 17) = 4..238
    +                length = (byte - 17) = 5..238
                     state = 4 [ don't copy extra literals ]
                     skip byte

    --
    2.26.2


IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ