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#58334: 29.0.50; ASAN heap use after free in gui_produce_glyphs Date: Fri, 07 Oct 2022 15:16:44 +0300 Message-ID: <834jwfomkz.fsf@gnu.org> References: <83fsg1osb1.fsf@gnu.org> <837d1cpzxk.fsf@gnu.org> <83czb3on9w.fsf@gnu.org> <83a667on2a.fsf@gnu.org> <5481395d-f7d1-8b9f-59d5-f681c113f6dd@gmail.com> <87mta7q1bp.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6163"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 58334@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 07 16:16:11 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 1ogo94-0001Rz-Cq for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Oct 2022 16:16:10 +0200 Original-Received: from localhost ([::1]:33698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogo92-0002xp-8p for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Oct 2022 10:16:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogmHm-0006IJ-4I for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 08:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogmHl-0000pv-RJ for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 08:17:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ogmHl-0004M9-Ln for bug-gnu-emacs@gnu.org; Fri, 07 Oct 2022 08:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Oct 2022 12:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58334 X-GNU-PR-Package: emacs Original-Received: via spool by 58334-submit@debbugs.gnu.org id=B58334.166514501216725 (code B ref 58334); Fri, 07 Oct 2022 12:17:01 +0000 Original-Received: (at 58334) by debbugs.gnu.org; 7 Oct 2022 12:16:52 +0000 Original-Received: from localhost ([127.0.0.1]:34653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogmHb-0004Lh-JY for submit@debbugs.gnu.org; Fri, 07 Oct 2022 08:16:51 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ogmHa-0004LV-A3 for 58334@debbugs.gnu.org; Fri, 07 Oct 2022 08:16:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59650) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogmHV-0000k1-3K; Fri, 07 Oct 2022 08:16:45 -0400 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=ZMlozQgvoh+aLOFWNT8Vgx6SxaT62M//FOwsUaFdbbs=; b=mk1//xWLXfz5 wRmsPSw6g7k32BpQYRm/wY5qZg//uSMR1sfJEf1WF2ah0Tt0oWwIe4D6YC/84114l6N2hNNBkSbGI K8s1RVX2EKpVsDJCJPKDR16LGYHBN8B73hgP0b8Z6LINr2ATL4bmBoRLcdo7Gcf07J1pf3ikqyXe8 StcHIWwVM96na5PB+pt5EjTsvYHL0S9M4PaUh6vyDGhvLqe6W+ztox5R9Tx5axVGcBa5CkykLLi/o anRBKpDsXVbLidpUJoap6tCpJCQXseKKsguPeIfvv5tJPK+5M03gcxxU0ANcOxGb7M0i9T4iT7STZ Bz/3WINxZJFYZL4K/kpqhA==; Original-Received: from [87.69.77.57] (port=4497 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 1ogmHU-0004ys-Fp; Fri, 07 Oct 2022 08:16:44 -0400 In-Reply-To: <87mta7q1bp.fsf@yahoo.com> (message from Po Lu on Fri, 07 Oct 2022 20:12:58 +0800) 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:244777 Archived-At: > From: Po Lu > Cc: Eli Zaretskii , 58334@debbugs.gnu.org > Date: Fri, 07 Oct 2022 20:12:58 +0800 > > In the recent past, Emacs also used to run Lisp as part of the character > conversion of keyboard input, straight from handle_one_xevent: > > if (nchars < nbytes) > { > /* Decode the input data. */ > > /* The input should be decoded with `coding_system' > which depends on which X*LookupString function > we used just above and the locale. */ > setup_coding_system (coding_system, &coding); > coding.src_multibyte = false; > coding.dst_multibyte = true; > /* The input is converted to events, thus we can't > handle composition. Anyway, there's no XIM that > gives us composition information. */ > coding.common_flags &= ~CODING_ANNOTATION_MASK; > > SAFE_NALLOCA (coding.destination, MAX_MULTIBYTE_LENGTH, > nbytes); > coding.dst_bytes = MAX_MULTIBYTE_LENGTH * nbytes; > coding.mode |= CODING_MODE_LAST_BLOCK; > decode_coding_c_string (&coding, copy_bufptr, nbytes, Qnil); > nbytes = coding.produced; > nchars = coding.produced_char; > copy_bufptr = coding.destination; > } > > How come that never caused problems? Why should it cause problems? what kind of problems?