From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: C file recoginzed as image file Date: Fri, 05 Jan 2007 21:55:10 -0500 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1168052377 1977 80.91.229.12 (6 Jan 2007 02:59:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 Jan 2007 02:59:37 +0000 (UTC) Cc: c.a.rendle@gmail.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 06 03:59:35 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H31mQ-0000GX-4b for ged-emacs-devel@m.gmane.org; Sat, 06 Jan 2007 03:59:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H31mP-0000pH-JG for ged-emacs-devel@m.gmane.org; Fri, 05 Jan 2007 21:59:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H31ia-0007HE-J8 for emacs-devel@gnu.org; Fri, 05 Jan 2007 21:55:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H31iZ-0007Gg-Qk for emacs-devel@gnu.org; Fri, 05 Jan 2007 21:55:35 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H31iZ-0007GU-BD for emacs-devel@gnu.org; Fri, 05 Jan 2007 21:55:35 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H31iY-0005zf-Du for emacs-devel@gnu.org; Fri, 05 Jan 2007 21:55:35 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1H31iA-0000O1-6K; Fri, 05 Jan 2007 21:55:10 -0500 Original-To: Chris Moore In-reply-to: (message from Chris Moore on Fri, 05 Jan 2007 16:02:38 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:64856 Archived-At: I don't want this situation to be possible in Emacs: I receive a file foo.c in an email, save it to disk and open it in Emacs, knowing that the .c type is opened in cc-mode which is safe. To my horror, the file actually contains an evil .jpg file which causes a buffer overflow in the jpg library; when it's displayed it infects my machine with a virus. Compare that with this scenario: You receive a file foo.jpg in an email, you save it to disk and open it in Emacs, figuring that a jpg file ought to be safe. To your horror, the file actually contains an evil .jpg file which causes a buffer overflow in the jpg library; when it's displayed it infects your machine with a virus. Assuming there is such a bug in the jpg library, the latter scenario seems much more likely than the former. Besides which, a jpg file starts with characters that don't make any sense at the start of a C file. So if it looks like a plausible C file, it won't be treated as a jpeg.