From unknown Sat Jun 21 02:58:33 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#4992 <4992@debbugs.gnu.org> To: bug#4992 <4992@debbugs.gnu.org> Subject: Status: Invalid use of strcpy() in etags Reply-To: bug#4992 <4992@debbugs.gnu.org> Date: Sat, 21 Jun 2025 09:58:33 +0000 retitle 4992 Invalid use of strcpy() in etags reassign 4992 emacs submitter 4992 Tobias Ringstr=C3=B6m severity 4992 normal thanks From tobias@ringis.se Fri Nov 20 07:43:25 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 20 Nov 2009 15:43:25 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.0 required=4.0 tests=MIXEDBDN,MURPHY_DRUGS_REL8 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAKFhMMU022527 for ; Fri, 20 Nov 2009 07:43:25 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBVdq-0005nS-L4 for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 10:43:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBVdk-0005lt-R9 for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 10:43:21 -0500 Received: from [199.232.76.173] (port=48348 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBVdk-0005lq-Mb for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 10:43:16 -0500 Received: from proxy2.bredband.net ([195.54.101.72]:50213) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NBVdk-0004ww-83 for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 10:43:16 -0500 Received: from ipb2.telenor.se (195.54.127.165) by proxy2.bredband.net (7.3.140.3) id 4AD3E1BC01136D77 for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 16:43:13 +0100 X-SMTPAUTH-B2: X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsRDAOVHBktT4+75PGdsb2JhbACBToJ3lzUBAQEBN6drkF+DaFQE X-IronPort-AV: E=Sophos;i="4.44,777,1249250400"; d="scan'208";a="5746208" Received: from ua-83-227-238-249.cust.bredbandsbolaget.se (HELO ringis.se) ([83.227.238.249]) by ipb2.telenor.se with ESMTP; 20 Nov 2009 16:43:13 +0100 Received: from ext-gw3.swedot.se ([194.17.162.110] helo=tobiaspc.swedot.se) by ringis.se with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1NBVda-0002qr-PK for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 16:43:07 +0100 Message-ID: <4B06B909.30402@ringis.se> Date: Fri, 20 Nov 2009 16:43:05 +0100 From: =?UTF-8?B?VG9iaWFzIFJpbmdzdHLDtm0=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Thunderbird/3.0b4 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: Invalid use of strcpy() in etags Content-Type: multipart/mixed; boundary="------------080708050901050001010604" X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. This is a multi-part message in MIME format. --------------080708050901050001010604 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit The function absolute_filename() lib-src/etags.c has two invalid calls to strcpy() with overlapping arguments. It's undefined C that often happens to work, but breaks very badly for at least gcc 4.4.2 and glibc 2.11 on x86_64, which is default for Fedora 12. The attached patch replaces the bogus strcpy() calls with calls to memmove(). /Tobias --------------080708050901050001010604 Content-Type: text/plain; name="emacs-23.1-strcpy-bug.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="emacs-23.1-strcpy-bug.patch" ZGlmZiAtcnUgZW1hY3MtMjMuMS5vcmlnL2xpYi1zcmMvZXRhZ3MuYyBlbWFjcy0yMy4xL2xp Yi1zcmMvZXRhZ3MuYwotLS0gZW1hY3MtMjMuMS5vcmlnL2xpYi1zcmMvZXRhZ3MuYwkyMDA5 LTA2LTIxIDA2OjM3OjM0LjAwMDAwMDAwMCArMDIwMAorKysgZW1hY3MtMjMuMS9saWItc3Jj L2V0YWdzLmMJMjAwOS0xMS0yMCAxNjozNTowOS42MzgyMDAxOTIgKzAxMDAKQEAgLTY2OTUs MTMgKzY2OTUsMTMgQEAKIAkgICAgICBlbHNlIGlmIChjcFswXSAhPSAnLycpCiAJCWNwID0g c2xhc2hwOwogI2VuZGlmCi0JICAgICAgc3RyY3B5IChjcCwgc2xhc2hwICsgMyk7CisJICAg ICAgbWVtbW92ZSAoY3AsIHNsYXNocCArIDMsIHN0cmxlbiAoc2xhc2hwICsgMikpOwogCSAg ICAgIHNsYXNocCA9IGNwOwogCSAgICAgIGNvbnRpbnVlOwogCSAgICB9CiAJICBlbHNlIGlm IChzbGFzaHBbMl0gPT0gJy8nIHx8IHNsYXNocFsyXSA9PSAnXDAnKQogCSAgICB7Ci0JICAg ICAgc3RyY3B5IChzbGFzaHAsIHNsYXNocCArIDIpOworCSAgICAgIG1lbW1vdmUgKHNsYXNo cCwgc2xhc2hwICsgMiwgc3RybGVuIChzbGFzaHAgKyAxKSk7CiAJICAgICAgY29udGludWU7 CiAJICAgIH0KIAl9Ck9ubHkgaW4gZW1hY3MtMjMuMS9saWItc3JjOiBldGFncy5jLm9yaWcK T25seSBpbiBlbWFjcy0yMy4xL2xpYi1zcmM6IGV0YWdzLmMucmVqCg== --------------080708050901050001010604-- From rgm@gnu.org Fri Nov 20 16:50:34 2009 Received: (at control) by emacsbugs.donarmstrong.com; 21 Nov 2009 00:50:34 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.2 required=4.0 tests=AWL,ONEWORD,VALID_BTS_CONTROL, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAL0oW9f011347 for ; Fri, 20 Nov 2009 16:50:33 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1NBeBL-0000Qr-MB; Fri, 20 Nov 2009 19:50:31 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19207.14679.626093.237244@fencepost.gnu.org> Date: Fri, 20 Nov 2009 19:50:31 -0500 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: yellow X-Ran: bd\:f@TlE.},B>anVwq:5^nd'<*1525;T}E~rD*uz6YPvccu2_-2=a_Wi_52q7sm#]-0Fp X-Debbugs-No-Ack: yes severity 4980 minor reassign 4983 spam reassign 4985 spam reassign 4986 spam severity 4987 wishlist reassign 4989 spam reassign 4990 spam reassign 4991 spam reassign 4992 emacs,etags reassign 4984 emacs,cc-mode From jan.h.d@swipnet.se Mon Nov 23 01:51:54 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Nov 2009 09:51:54 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAN9pqDg013628 for ; Mon, 23 Nov 2009 01:51:53 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NCVaK-00084T-5L for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2009 04:51:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NCVaF-00082e-9B for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2009 04:51:51 -0500 Received: from [199.232.76.173] (port=37672 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCVaF-00082V-4d for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2009 04:51:47 -0500 Received: from proxy2.bredband.net ([195.54.101.72]:61092) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NCVaE-0003s9-Kn for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2009 04:51:46 -0500 Received: from ipb2.telenor.se (195.54.127.165) by proxy2.bredband.net (7.3.140.3) id 4AD3E1BC011FC461 for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2009 10:51:45 +0100 X-SMTPAUTH-B2: X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar9jAIbqCUtV4S1uPGdsb2JhbACBTYJ3lGeCWAEBAQE3p0KPRoEwgjhUBA X-IronPort-AV: E=Sophos;i="4.47,271,1257116400"; d="scan'208";a="6615769" Received: from c-6e2de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.110]) by ipb2.telenor.se with ESMTP; 23 Nov 2009 10:51:44 +0100 Received: from [172.20.199.2] (gaffa [172.20.199.2]) by coolsville.localdomain (Postfix) with ESMTP id E545F7FA07B; Mon, 23 Nov 2009 10:51:42 +0100 (CET) Message-ID: <4B0A5B2E.8050305@swipnet.se> Date: Mon, 23 Nov 2009 10:51:42 +0100 From: =?UTF-8?B?SmFuIERqw6Rydg==?= User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: =?UTF-8?B?VG9iaWFzIFJpbmdzdHLDtm0=?= , 4992@debbugs.gnu.org CC: bug-gnu-emacs@gnu.org, 4992-done@debbugs.gnu.org Subject: Re: bug#4992: Invalid use of strcpy() in etags References: <4B06B909.30402@ringis.se> In-Reply-To: <4B06B909.30402@ringis.se> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: Quoted-Printable X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Tobias Ringstr=C3=B6m skrev: > The function absolute_filename() lib-src/etags.c has two invalid calls=20 > to strcpy() with overlapping arguments. It's undefined C that often=20 > happens to work, but breaks very badly for at least gcc 4.4.2 and glibc= =20 > 2.11 on x86_64, which is default for Fedora 12. >=20 > The attached patch replaces the bogus strcpy() calls with calls to=20 > memmove(). >=20 Checked in, thanks. Jan D. From unknown Sat Jun 21 02:58:33 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 21 Dec 2009 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator