Bug 452362

Summary: Structure for PNG file header uses wrong endianess
Product: [Applications] okteta Reporter: Nicolas Christin <kde.cardiac539>
Component: Structures ToolAssignee: Alex Richardson <arichardson.kde>
Status: RESOLVED FIXED    
Severity: minor CC: kossebau
Priority: NOR    
Version First Reported In: 0.26.7   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 0.26.8
Sentry Crash Report:

Description Nicolas Christin 2022-04-07 14:28:39 UTC
SUMMARY
The PNG file header structure that comes with Okteta assumes "width" and "height" are little endian (on x86_64 at least), when they should always be big endian, as per the specifications.

STEPS TO REPRODUCE
Open a PNG file in Okteta and apply the "PNG file header" structure. The "width" and "height" fields are incorrect. For example, for a PNG that is 512 pixel wide (0x00000200), it will show a width of 131072 (0x00020000).
Comment 1 Friedrich W. H. Kossebau 2022-05-16 17:54:29 UTC
Git commit b8abb13b01374b2d57f5e31fec16d3eb821233d2 by Friedrich W. H. Kossebau.
Committed on 16/05/2022 at 11:02.
Pushed by kossebau into branch '0.26'.

PNG structure definition: always use network byte order (big endian)

FIXED-IN:0.26.8

M  +1    -1    kasten/controllers/view/structures/examples/okteta/structures/png/main.osd

https://invent.kde.org/utilities/okteta/commit/b8abb13b01374b2d57f5e31fec16d3eb821233d2