From owner-svn-src-all@freebsd.org Sat Mar 14 17:40:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2668B25FC9A for ; Sat, 14 Mar 2020 17:40:22 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48fqb86x99z3Lw9 for ; Sat, 14 Mar 2020 17:40:20 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-oi1-f182.google.com with SMTP id v19so13132404oic.12 for ; Sat, 14 Mar 2020 10:40:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:cc; bh=ZhUn31aKGtlHPpbmtoHKLFV0FQ9XHog/khUhvcR+F6c=; b=jQUN2mDsBj0a7ho3LK2exUPQTsXMl+zvOC2YB2T8e4fTDIoa7JcwMNdsgS1n2QNnlj OVW11jJyVolq+lILBvShjNxaG2VlzH54KcnWNQOSRsTHEJeJBv9RnY1ujBDwfjVVcoH3 m3y1MaHfu58WEtMfnxQIqGyugF75chwLV2xOOMa5BJbWFhVEzKKHiTAxzfQ04HyIX7uW L8HsAsXTCawjwr5xr8b9aiGl25By661rCh9jCFoCLQrP7+oHRqroWdmPjaxhMDqNp12c QL+Bc25X/XmRib0qcl8wUOdps70mihfEIeIMFB/8MHhnHypW1zFRRoG5RpkwCOMoaiyE 72bw== X-Gm-Message-State: ANhLgQ2xPhYkSYg0rMVfhAqwmKyVaP6lDdwy7hNfgmwtZZUNanhSLTkk jO/AABWB7bh6gvcPd1owZ07vOK/h X-Google-Smtp-Source: ADFU+vt3tKdCRKZTDrqhjNAR4+5jkMvPtj9OQuuoiqs88fceRey9mxRLfdiyMUjGmbNLXotGOVlVCQ== X-Received: by 2002:aca:bad7:: with SMTP id k206mr11187678oif.78.1584207619281; Sat, 14 Mar 2020 10:40:19 -0700 (PDT) Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com. [209.85.210.42]) by smtp.gmail.com with ESMTPSA id e64sm2781207oif.10.2020.03.14.10.40.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Mar 2020 10:40:18 -0700 (PDT) Received: by mail-ot1-f42.google.com with SMTP id t28so10926410ott.5 for ; Sat, 14 Mar 2020 10:40:18 -0700 (PDT) X-Received: by 2002:a05:6830:110c:: with SMTP id w12mt1001410otq.175.1584207618527; Sat, 14 Mar 2020 10:40:18 -0700 (PDT) MIME-Version: 1.0 References: <202003140557.02E5vMBA097086@repo.freebsd.org> In-Reply-To: <202003140557.02E5vMBA097086@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sat, 14 Mar 2020 10:40:08 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r358988 - head/usr.bin/gzip Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 48fqb86x99z3Lw9 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.167.182 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-0.99 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[cem@freebsd.org]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; MISSING_TO(2.00)[]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[182.167.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-0.99)[ip: (-0.30), ipnet: 209.85.128.0/17(-2.97), asn: 15169(-1.65), country: US(-0.05)]; RWL_MAILSPIKE_POSSIBLE(0.00)[182.167.85.209.rep.mailspike.net : 127.0.0.17]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Mar 2020 17:40:22 -0000 For additional context, this quiesces (false positive) Coverity CID 1383554. On Fri, Mar 13, 2020 at 10:57 PM Xin LI wrote: > > Author: delphij > Date: Sat Mar 14 05:57:22 2020 > New Revision: 358988 > URL: https://svnweb.freebsd.org/changeset/base/358988 > > Log: > Remove unneeded checks for prelen. > > In order to determine the type of a compressed file, we have to read > in the first four bytes which may also be important for decompression > purposes, to do that we would pass the buffer that we have already > read in, along with the size of it. > > Rename header1 to fourbytes to make that explicit, and remove all > checks for prelen.