From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#53333: Fix for crash in ebrowse Date: Thu, 20 Jan 2022 13:45:31 +0200 Message-ID: <83zgnqpr50.fsf@gnu.org> References: <87fspm0z47.fsf@stranik.org> <835yqgvru9.fsf@gnu.org> <878rvc1pdk.fsf@stranik.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31866"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53333-done@debbugs.gnu.org To: Jan Stranik Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 20 17:16:46 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAa7B-00087j-O5 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Jan 2022 17:16:45 +0100 Original-Received: from localhost ([::1]:37632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAa79-0007RT-VJ for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Jan 2022 11:16:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:58830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAVuA-0007Xb-Sp for bug-gnu-emacs@gnu.org; Thu, 20 Jan 2022 06:47:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nAVuA-0001Ai-2U for bug-gnu-emacs@gnu.org; Thu, 20 Jan 2022 06:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nAVuA-0004LU-1j for bug-gnu-emacs@gnu.org; Thu, 20 Jan 2022 06:47:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Jan 2022 11:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 53333 X-GNU-PR-Package: emacs Mail-Followup-To: 53333@debbugs.gnu.org, eliz@gnu.org, jan@stranik.org Original-Received: via spool by 53333-done@debbugs.gnu.org id=D53333.164267919416660 (code D ref 53333); Thu, 20 Jan 2022 11:47:01 +0000 Original-Received: (at 53333-done) by debbugs.gnu.org; 20 Jan 2022 11:46:34 +0000 Original-Received: from localhost ([127.0.0.1]:56557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nAVth-0004Ke-US for submit@debbugs.gnu.org; Thu, 20 Jan 2022 06:46:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nAVtf-0004KQ-IP for 53333-done@debbugs.gnu.org; Thu, 20 Jan 2022 06:46:31 -0500 Original-Received: from [2001:470:142:3::e] (port=39410 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAVtE-0000mH-Aa; Thu, 20 Jan 2022 06:46:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Rr344AdRTMey7jHHstaisn18FK+lH2yssXBHmhWvqf8=; b=X/7VZtY38ewb SEMiA0Kliam3KxUesxkMHVZBCQmhefhq2XaeJ7DkSGux34IufffErrnjYJ0DtYItpT/K5RGUsMXZt uttkN08GkL+n2rZtPSl/D3X8SiiYlP8B5ytG4kW5GyoU2T3tGmxKvIih8zuBUEMRHxvrqoUMMtr/k rgF0HeJDgtZe5xiWq4sN5l1XzN984AXKxJf/rpIE6v5hFXAKCsZpEo/oQ4eVODcK6uPmEVk0qbm/C ad4Ld8JUPjKgaPvKVhRV3eJrcwDnDFIq5NilC8ynBXBn8holiXit7ruG+gm21GVGq5v3ZfuCUFTr6 TOvXBVtgKhlhBelNgJ8ztg==; Original-Received: from [87.69.77.57] (port=1743 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAVsj-0004U1-Ux; Thu, 20 Jan 2022 06:45:41 -0500 In-Reply-To: <878rvc1pdk.fsf@stranik.org> (message from Jan Stranik on Tue, 18 Jan 2022 20:32:55 -0500) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:224681 Archived-At: > From: Jan Stranik > Cc: 53333@debbugs.gnu.org > Date: Tue, 18 Jan 2022 20:32:55 -0500 > > > > > Thanks, but can you explain the need for this part: > > > >> ! else { > >> ! s++; > >> ! break; > >> ! } > >> ! } > > > > Why do we need to advance the pointer 's' in the 'else' clause? why > > not leave it alone? > > The identifier is copied from end to the buffer. As we are copying, we > want to escape quote and backslash characters. Normally if we encounter > any of these characters we just prepend \ to in front. If there is not > enough space in the buffer to insert the \, we should increase the s, to > back-out the character that we wanted to escape. > > If we would not do that, the first character might not be escaped. If > that character were a quote, it would break the lisp expressions written > later to the BROWSE file. Thanks, I installed the change on the emacs-28 branch, and I'm marking this bug done.