From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vinicius Jose Latorre Newsgroups: gmane.emacs.devel Subject: Re: C file recoginzed as image file Date: Tue, 09 Jan 2007 11:57:55 -0200 Message-ID: <45A39F63.2010608@ig.com.br> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1168351060 8662 80.91.229.12 (9 Jan 2007 13:57:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Jan 2007 13:57:40 +0000 (UTC) Cc: Stephen Leake , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 09 14:57:37 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 1H4HTn-00020O-01 for ged-emacs-devel@m.gmane.org; Tue, 09 Jan 2007 14:57:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H4HTm-0005Hn-Gb for ged-emacs-devel@m.gmane.org; Tue, 09 Jan 2007 08:57:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H4HTJ-0004yo-RU for emacs-devel@gnu.org; Tue, 09 Jan 2007 08:57:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H4HTH-0004vZ-Nv for emacs-devel@gnu.org; Tue, 09 Jan 2007 08:57:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H4HTH-0004uq-4d for emacs-devel@gnu.org; Tue, 09 Jan 2007 08:56:59 -0500 Original-Received: from [200.221.4.208] (helo=smtp.uol.com.br) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H4HTG-0007mv-FT for emacs-devel@gnu.org; Tue, 09 Jan 2007 08:56:58 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by socom7.uol.com.br (Postfix) with ESMTP id 8ADB59FF; Tue, 9 Jan 2007 10:56:57 -0300 (BRT) Original-Received: from [200.208.45.59] (2084559.cps.virtua.com.br [200.208.45.59]) by socom7.uol.com.br (Postfix) with ESMTP id 17B698C5; Tue, 9 Jan 2007 10:56:54 -0300 (BRT) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20061211 SeaMonkey/1.0.7 Original-To: Juanma Barranquero In-Reply-To: X-SIG5: 28f7ef8a9b3ea583aa0bda80926fba7f 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:65065 Archived-At: Juanma Barranquero wrote: > On 1/9/07, Stephen Leake wrote: > >> "if the file extension does not match the contents, it is more likely >> that this is a virus attack" > > "More likely" than what? More likely than the alternative: that it is > not a virus attack? > > I have mislabeled images in my hard disk: it's not unusual in my > experience to find an image in format A, with an extension suggesting > that it is in format B. So far, none of them have been virus attacks. > > Are you proposing also that we reject (or warn about) a .PNG file > disguised as a .JPG, for example? We don't have a png-mode and a > jpeg-mode; the auto-detection and image opening machinery just return > image-mode. Should we redesign it to take that into account? > /L/e/k/t/u What about the heuristic: "if the file extension is not an image file extension and the contents is not an image, it is more likely that this is a virus attack" ?? Could a valid image file (GIF, JPG, PNG, etc.) with a valid file extension contain a virus?