[File] Negative sizes for 128x128 ico files

Christoph Biedl astron.com.bwoj at manchmal.in-ulm.de
Sun Mar 2 11:48:40 UTC 2025


Hello,

Debian bug report <https://bugs.debian.org/1098991> (has also a download
link for reproducers).

It seems icon files with a size of 128x128 are printed with a negative
value, i.e. "-128x-128". It seems just making the type unsigned does the
trick, or:

--- a/magic/Magdir/msdos
+++ b/magic/Magdir/msdos
@@ -2115,9 +2115,9 @@
 #      display shared information of cursor or icon entry
 0              name            cur-ico-entry
 >0             byte            =0              \b, 256x
->0             byte            !0              \b, %dx
+>0             ubyte           !0              \b, %dx
 >1             byte            =0              \b256
->1             byte            !0              \b%d
+>1             ubyte           !0              \b%d
 # number of colors in palette
 >2             ubyte           !0              \b, %d colors
 # reserved 0 FFh

Regards,

    Christoph


More information about the File mailing list