bugGNU GRUB - Bugs: bug #62125, Error on read (some) 4-bit PNG...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #62125: Error on read (some) 4-bit PNG images

Submitter:  Pat L <patl1729>
Submitted:  Mon 28 Feb 2022 05:35:26 PM UTC
   
 
Category:  Terminal Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Release:  2.02
Release:  Reproducibility:  None
Planned Release:  None

Wed 27 Apr 2022 07:28:38 PM UTC, comment #1: 

Just for the record, "pnmtopng -force" creates (non-paletted) PNG files that avoid this issue.

Pat L <patl1729>
Mon 28 Feb 2022 05:35:26 PM UTC, original submission:  

The attached PNG file is valid. It was generated by "pnmtopng"; it loads in every viewer I have tried; and it passes "pngcheck".

But when I try to load it from GRUB (UEFI boot) using "background_image", I get this error:


  error: ../../grub-core/video/readers/png.c:595 invalid filter value


Note that this image's depth is 4 bits (with a palette):


$ pngcheck -v logo-save.png  | head -3
File: logo-save.png (594 bytes)
  chunk IHDR at offset 0x0000c, length 13
    640 x 480 image, 4-bit palette, non-interlaced


When I modify this image to add more colors, making the depth 8 bits, GRUB can load the modified image without any trouble.

Possibly related, the validation check at png.c line 286:

https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/video/readers/png.c?h=grub-2.02#n286

...specifically allows a 4-bit image depth. (Separate bug: The error message on line 290 does not match the check.)

I believe others have encountered the same bug; see e.g. https://bugs.mageia.org/show_bug.cgi?id=28225

Pat L <patl1729>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #52942:  logo.png added by patl1729 (594B - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by patl1729 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-02-28 patl1729 Attached File- Added logo.png, #52942

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code