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: Tue, 18 Jan 2022 20:09:18 +0200 Message-ID: <835yqgvru9.fsf@gnu.org> References: <87fspm0z47.fsf@stranik.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40302"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53333@debbugs.gnu.org To: Jan Stranik Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 18 19:13:32 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 1n9sz6-000AMZ-5f for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Jan 2022 19:13:32 +0100 Original-Received: from localhost ([::1]:45186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9sz5-0006mn-7B for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Jan 2022 13:13:31 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9svi-0003y7-Ie for bug-gnu-emacs@gnu.org; Tue, 18 Jan 2022 13:10:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58749) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9svi-0005fT-8p for bug-gnu-emacs@gnu.org; Tue, 18 Jan 2022 13:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n9svi-0000Y0-3y for bug-gnu-emacs@gnu.org; Tue, 18 Jan 2022 13:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jan 2022 18:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53333 X-GNU-PR-Package: emacs Original-Received: via spool by 53333-submit@debbugs.gnu.org id=B53333.16425293772066 (code B ref 53333); Tue, 18 Jan 2022 18:10:02 +0000 Original-Received: (at 53333) by debbugs.gnu.org; 18 Jan 2022 18:09:37 +0000 Original-Received: from localhost ([127.0.0.1]:51652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9svI-0000XG-QO for submit@debbugs.gnu.org; Tue, 18 Jan 2022 13:09:36 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n9svE-0000Wx-UB for 53333@debbugs.gnu.org; Tue, 18 Jan 2022 13:09:36 -0500 Original-Received: from [2001:470:142:3::e] (port=42988 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 1n9sv7-0005XO-Su; Tue, 18 Jan 2022 13:09: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=3M0kIsRemBHzAnLWcpNLMGReEq3niTwUQtsywB9sbPo=; b=PmzfahYdkbya GiaR3/zDP1YbR2pM5uQ9IWeAW4OUnngrqNxQXdFObvf4HPCi+9y3e1lbj5uCMc6qqEqdYLNKUMwEp FHdKgwfRVBuMCdo02M98erDuOQAmgVcg/kreqRDzOjK64x2WlJRBa599+Qi67hXT0Biz7zr+musuX SIIDXJu8/IMUAhbjaVDvMmaDCAR9zPw9mrF2Snl0Q1wKuSD2j3AhhDNpZAGLoTwlunc5wUZS3rGFb WDQt7Z95fel/QrevNOfAnveleEyQQZd6iZoEIkLHXXPmk/KMmeKsZuR5R1EisAFX4J0tTjVMheTza YE9Vi8oRpJ8cpSX4SBl7rw==; Original-Received: from [87.69.77.57] (port=2702 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 1n9sv7-0004ZM-SN; Tue, 18 Jan 2022 13:09:26 -0500 In-Reply-To: <87fspm0z47.fsf@stranik.org> (bug-gnu-emacs@gnu.org) 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:224518 Archived-At: > Date: Mon, 17 Jan 2022 17:35:36 -0500 > From: Jan Stranik via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > attached is a patch to ebrowse. Noticed a one-off write error in case of > identifiers that are too long and need escaping. The patch prevents the > write to memory outside of allocated range which on my platform caused > segfault. 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? Or maybe I will understand the reason if you show some simple code that hits this problem (which would be a good thing of its own, as we'd then have a test to add to our test suite)?