52
submitted 1 year ago by floppy@rabbitea.rs to c/linux@lemmy.ml

cross-posted from: https://rabbitea.rs/post/212623

I was having an email conversation with Stoo Cambridge, and he mentioned that he was having trouble making his Linux machine display thumbnails of Amiga IFF/ILBM files. It turns out I have a solution for him, so I am sharing it here to help anyone else.

top 3 comments
sorted by: hot top controversial new old
[-] addie@feddit.uk 3 points 1 year ago

... email conversation with Sensible Software legend Stoo Cambridge, and ...

Nice that the solution for this is so trivial, if you want it. Always a bit of a security concern though with these venerable old file formats (and certainly, no modern machine wants the colour palette in interleaved bitplanes) where the loading technique was generally 'map it into memory, and treat it like a struct'. ILBM isn't as complicated as eg. TIFF, but buffer overruns and pointer shenanigans in dusty code is something to be wary of - I wouldn't want this enabled by default

[-] oldfart@lemm.ee 2 points 1 year ago* (last edited 1 year ago)

When was mapping files from unknown sources to structs okay? I've learned programming in late 90s/early 00s and at that time it was already advised against.

Imagemagick exists since 1987 though, so maybe it still has this kind of code somewhere.

[-] addie@feddit.uk 2 points 1 year ago

Advised against in the late 90s since it was a pretty common habit from the dawn of computing through till the early 90s, and they'd finally realised it wasn't the best of ideas, even if it was very very fast.

The number of times that Windows has been pwn3d by 'legacy' formats - images, font files, crazy stuff - that it's attempted to parse for thumbnails is pretty crazy. There's a lot of programmers writing unsafe code out there.

this post was submitted on 24 Aug 2023
52 points (100.0% liked)

Linux

48376 readers
1268 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS