Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp322953ybr; Fri, 22 May 2020 07:31:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSLmmuAG5o1Aa9eIPAsoyaO40SFFkERsAu0Oprm3U3IVbekm7xwNSYw4PZDE7l1a1WnoAv X-Received: by 2002:a17:907:447c:: with SMTP id oo20mr8256123ejb.385.1590157870980; Fri, 22 May 2020 07:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590157870; cv=none; d=google.com; s=arc-20160816; b=tuWMm+UQBN4hk/NS98tJt4FJxsB4HJbqtAWgugfZT8TETwVxO+mz7tm3sXzZVx+Tsw 85HQE10q1nBA+eR/qpH2gP9JXlKDlVaE1+kxf89Gc7kzgS9CwTmld9McDhJRhTgkulzy JlMheFCDX0hBo0U1GDUFFmOIZFPfVosB7XWGAczJk7HJUCtI/XaQ/aFrIqx5iVQaIPu0 YudmxSCxohZP1OUxMLF9X3L+u3nfRLxM5qK/THZNF45F26jTlxDU2GnroC9NNkRy44tP PXyrP8+R1otOuH3cbPFG88AX7O58BnZqmOYfXwl8l4EJk04BhpjLSOYGXpjUa5ZSmEWf j+4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=0wE8Hm83A1PIh/UE41trPGkwqL5IyXcQ1VhjFdlbwFs=; b=YZbbmNmMN2Qws5xmC2LehpqOXqwdZI5Q1px0qshXvbDe2ZZh2JP8wdCHiWT02uLG8J xr7S4I6cmKk5Xtlh6xFZAbTdg5R9q/VQnfMnf1WVzrbjzroBow9ITEEKizG6o4LqbQLi ZbH2Y0egMGmqYUJSD0i8E7qicbibGfq8+qifyseGznEpM2rUBXJHogxsHD087VgWFtnC DwHm7xHXYuyuzjF389qI0MYxGK7HDM89S6FjGZzJ3ZVd7/LMXU/Lk/XjvUsLwdqZWr0V QaKJct8b3oJLLhi764pAFVkXDl0iA9fQzc0SdjOY2SJwhr04q8+WNahv8pmgegJcFydY tt1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ulukai.org header.s=ulukai header.b=joORiURJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r13si4530571edt.263.2020.05.22.07.30.46; Fri, 22 May 2020 07:31:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@ulukai.org header.s=ulukai header.b=joORiURJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730197AbgEVO1C (ORCPT + 99 others); Fri, 22 May 2020 10:27:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728947AbgEVO1C (ORCPT ); Fri, 22 May 2020 10:27:02 -0400 X-Greylist: delayed 977 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 22 May 2020 07:27:02 PDT Received: from ulukai.org (ulukai.org [IPv6:2a01:488:66:1000:b01c:1258:0:1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CCA7C061A0E; Fri, 22 May 2020 07:27:02 -0700 (PDT) Received: from arona (unknown [46.114.108.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ulukai.org (Postfix) with ESMTPSA id 49T7gP4fXhz3GvB; Fri, 22 May 2020 16:10:41 +0200 (CEST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at ulukai.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ulukai.org; s=ulukai; t=1590156641; bh=sWdSGL53EfDwJLVKZKFLd7/vKcGqH4BG8g+uuzQqTLA=; h=From:To:Cc:Subject:Date:From; b=joORiURJ/QVNi7zV97rNXb2YTaVXn/+sjlSISaOdyaNYQRtBT3/3pLwB1W2FrVcVR PBPVPrhoVAbw6hDi9pvdn53lCLzm856ZGNfgscfF8ClZTkmMvXgalSqgl4HC/TBhRV cuPP9sQivpF7aIB15MF9q6FY/VClGcD4P+b68X4E= From: "C. Masloch" To: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Jonathan Corbet , Dave Rodgman , Willy Tarreau , Andrew Morton Subject: [PATCH 1/2] docs: lzo: fix first byte interpretation off-by-one Date: Fri, 22 May 2020 16:10:39 +0200 Message-Id: <20200522141040.1353769-1-pushbx@ulukai.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on ulukai.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 literals ] + 18..21 : copy 1..4 literals + state = (byte - 17) = 1..4 [ copy 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