From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75543 invoked by alias); 17 Jan 2017 23:02:09 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 73173 invoked by uid 89); 17 Jan 2017 23:02:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=H*M:cygwin, H*Ad:U*yselkowitz, H*F:D*cygwin.com X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Jan 2017 23:02:06 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B4F394D686 for ; Tue, 17 Jan 2017 23:02:06 +0000 (UTC) Received: from [10.10.116.66] (ovpn-116-66.rdu2.redhat.com [10.10.116.66]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0HN257x006824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 17 Jan 2017 18:02:06 -0500 Subject: Re: [PATCH] src_postinst.cygpart: Sanitize binary data in bash command subst To: cygwin-apps@cygwin.com References: <20161216204052.5657-1-eblake@redhat.com> From: Yaakov Selkowitz Message-ID: <8db032b6-bab7-af44-2989-9bae7acf38bb@cygwin.com> Date: Tue, 17 Jan 2017 23:02:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00019.txt.bz2 On 2016-12-16 15:09, Eric Blake wrote: > On 12/16/2016 02:40 PM, Eric Blake wrote: >> bash 4.4 now warns about skipping NUL bytes in $(command), since >> command substitution is only well-formed for commands that output >> text, but NUL bytes are not text. Silence the warning by removing >> NUL bytes from the stream before bash can see them. > > And of course, reading this in isolation, we could shave a process or > two by merging the two case statements into one, if you want to go one > step further as a micro-optimization: Squashed and pushed. Thanks, -- Yaakov