From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#62790: 29.0.60; WEBP header regexp in image-type-header-regexps fails files containing newlines Date: Wed, 12 Apr 2023 22:22:29 +0530 Message-ID: <87jzyhdovm.fsf@gmail.com> References: <87o7ntdxg4.fsf@gmail.com> <835ya16qry.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37126"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 62790@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 12 18:53:49 2023 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 1pmdjB-0009Sg-7R for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Apr 2023 18:53:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmdiR-0002xE-Ob; Wed, 12 Apr 2023 12:53:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmdiQ-0002wu-VG for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 12:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pmdiQ-0002ba-NJ for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 12:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pmdiQ-0001kd-AJ for bug-gnu-emacs@gnu.org; Wed, 12 Apr 2023 12:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Apr 2023 16:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62790 X-GNU-PR-Package: emacs Original-Received: via spool by 62790-submit@debbugs.gnu.org id=B62790.16813183616694 (code B ref 62790); Wed, 12 Apr 2023 16:53:02 +0000 Original-Received: (at 62790) by debbugs.gnu.org; 12 Apr 2023 16:52:41 +0000 Original-Received: from localhost ([127.0.0.1]:41639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmdi4-0001ju-N1 for submit@debbugs.gnu.org; Wed, 12 Apr 2023 12:52:40 -0400 Original-Received: from mail-pl1-f193.google.com ([209.85.214.193]:34752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pmdi1-0001jg-V5 for 62790@debbugs.gnu.org; Wed, 12 Apr 2023 12:52:39 -0400 Original-Received: by mail-pl1-f193.google.com with SMTP id h24so12166725plr.1 for <62790@debbugs.gnu.org>; Wed, 12 Apr 2023 09:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681318352; x=1683910352; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ycB5mrW8CyNHWyiBXGunisKB07yr4j80gTGsMXdY+6Q=; b=Js1/3yP+h0aTLDA8BvZgB2C6ziLOtJsCDTTdIG7b7T9I4cbRNCNsTDO5rL+NefqKeT XF4W8PG4GeP0ZJ+GTcb/SiE7nMAfbVb525Sp5A5v5vWQpGgy+i+ybqJmzN7odZNJnYL1 xOjrqC0myuM63BJuWEZoRHVOyh2t/PinlNyH9JEay0xuE+oTXMixwtPOSYDHi/JZOTk1 wuydF2udjapEzjh8yG3YS6fk8YkNNaSRvUN+0TX/Vscw++V0zaPfB08TOSZkK6HYvlsu 1trQd3jZqMYNAhxPhJROOS4+HMcf4iQczQmSRG7+xVON1GwGf5KibE9FrlbfGkXZ9s1f qo9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681318352; x=1683910352; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ycB5mrW8CyNHWyiBXGunisKB07yr4j80gTGsMXdY+6Q=; b=g08UczwIG6xKHRGv5Pl9VP+RNQY6i7HKXJdOAlqZS1+E0CggEu4fza/UBLMyRmG23z jcIJnKEd9944DUKkwtpdAaUFBeD8Z5N/55XGiTs52VaGYE6ew5wh8z6ypNMa5moGcriY pnLY9LGj/tXrIdZEuzB/h4CjNPfZ/xtijQuhxOZTlTb2v+GvTPdr57ys1WwUtyemImho +tOOXwTIblYYEVZkjSUcGkIxSrLr1w9pUo7hJWOvjBIuEWrxp2TUzdFVQLGQPDeDno/r F5iVDNkfz0dwpTh60HKyioZLC+rkcY1O5gwXwQxbP+vTYzSZp+li9NON+HrCsO4dzY00 mwiA== X-Gm-Message-State: AAQBX9fdpGon1Y59s7vIYImFNRLJqCS+fKU5dgiRmuYBJ2slSV06ftvC NO7rl0sWPDGRaU38iFCE4Tk= X-Google-Smtp-Source: AKy350aeqK3IruVBratMoN+kUpzIQF+VZhTBreToVi2ofM1Jb3aO5sQmX4i65QjKZ4ZKsWowbwFg2Q== X-Received: by 2002:a17:903:10b:b0:1a2:86c6:7b66 with SMTP id y11-20020a170903010b00b001a286c67b66mr17677996plc.4.1681318351947; Wed, 12 Apr 2023 09:52:31 -0700 (PDT) Original-Received: from localhost ([118.185.152.162]) by smtp.gmail.com with ESMTPSA id t14-20020a170902b20e00b001a507d9f836sm10926692plr.290.2023.04.12.09.52.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Apr 2023 09:52:31 -0700 (PDT) In-Reply-To: <835ya16qry.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 12 Apr 2023 18:53:21 +0300") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259785 Archived-At: [=E0=AE=AA=E0=AF=81=E0=AE=A4=E0=AE=A9=E0=AF=8D =E0=AE=8F=E0=AE=AA=E0=AF=8D= =E0=AE=B0=E0=AE=B2=E0=AF=8D 12, 2023] Eli Zaretskii wrote: > merge 62790 62789 > thanks > >> From: Visuwesh >> Date: Wed, 12 Apr 2023 19:17:23 +0530 >>=20 >> Attached image contains a newline in the header after "RIFF" which the >> regexp in image-type-header-regexps fails to match. This makes >> create-image return nil for such an image when FILE-OR-DATA is DATA and >> DATA-P is non-nil. > > Not sure why you filed two identical reports. Did you send the same > email twice to the bug tracker? It was an accident. I was having power cuts every 15 mins, it got me and I managed to send the mail twice. [=E0=AE=AA=E0=AF=81=E0=AE=A4=E0=AE=A9=E0=AF=8D =E0=AE=8F=E0=AE=AA=E0=AF=8D= =E0=AE=B0=E0=AE=B2=E0=AF=8D 12, 2023] Eli Zaretskii wrote: >> From: Visuwesh >> Date: Wed, 12 Apr 2023 19:17:13 +0530 >>=20 >> Attached image contains a newline in the header after "RIFF" which the >> regexp in image-type-header-regexps fails to match. This makes >> create-image return nil for such an image when FILE-OR-DATA is DATA and >> DATA-P is non-nil. > > Thanks, but please show a recipe, starting from "emacs -Q", to > reproduce the problem with this image. I just visited it with > "C-x C-f" and didn't see any problems. Please evaluate (create-image (with-temp-buffer (insert-file-contents-literally "/path/to/attached/image") (buffer-string)) nil t) in emacs -Q and observe the return value. It will return nil even though it is a valid webp file. The reason C-x C-f succeeds is because the file has the "webp" extension and thusly `image-supported-p' call in `image-type' returns non-nil.