From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 043af70f for ; Wed, 26 Jun 2019 12:08:17 +0000 (UTC) Received: (qmail 14439 invoked by alias); 26 Jun 2019 12:08:11 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44451 Received: (qmail 18803 invoked by uid 1010); 26 Jun 2019 12:08:11 -0000 X-Qmail-Scanner-Diagnostics: from mx1.redhat.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25489. spamassassin: 3.4.2. Clear:RC:0(209.132.183.28):SA:0(-6.9/5.0):. Processed in 0.832649 secs); 26 Jun 2019 12:08:11 -0000 X-Envelope-From: kdudka@redhat.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf1.redhat.com designates 209.132.183.28 as permitted sender) From: Kamil Dudka To: Peter Stephenson Cc: zsh-workers@zsh.org Subject: Re: Fwd: Re: [PATCH] {,un}applychange: do not call zle_setline(NULL) if quietgethist() fails Date: Wed, 26 Jun 2019 14:07:56 +0200 Message-ID: <4746461.Lp3oDyjsov@kdudka-nb> In-Reply-To: <1126656148.1725000.1561546844984@mail2.virginmedia.com> References: <20190626101908.548-1-kdudka@redhat.com> <249696510.1723352.1561545091592@mail2.virginmedia.com> <1126656148.1725000.1561546844984@mail2.virginmedia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 26 Jun 2019 12:07:35 +0000 (UTC) On Wednesday, June 26, 2019 1:00:44 PM CEST Peter Stephenson wrote: > > On 26 June 2019 at 11:19 Kamil Dudka wrote: > > > > > > There is a bug report in Red Hat Bugzilla about zsh crashing on NULL > > pointer dereference: https://bugzilla.redhat.com/1722703 > > > > I was not able to reproduce the crash myself but the attached patch > > should prevent zsh from crashing in this situation. > > Hmm... I'm guessing that in the failure case we probably shouldn't > set zlecs either? It's probably not going to do anything helpful. > Possibly also return 1? > > pws Good point. zlecs should not be updated when zleline is not updated. Sorry for missing it in the proposed patch. Returning 1 might also be better although I do not really understand why quietgethist() returns NULL in the mentioned case. Kamil