3 ms·
I don't see any sort of background at all on how it's working. There's metadata in the image that helps reconstruct the original? Or something about how Disco
by tyingq 4y ago
I don't see any sort of background at all on how it's working. There's metadata in the image that helps reconstruct the original? Or something about how Discord does the attachment, or?
Ah, one commenter offered this:
"It looks like when the edits make the PNG smaller it saves the original number of bytes, overflowing its own buffer and leaving a bunch of unintended IDAT chunks to find :). Did you talk to Google about this before taking to twitter though?"
https://twitter.com/Bottersnike237/status/1636892723012665344 https://twitter.com/Bottersnike237/status/163689272301266534...
- Retr0id 4y agoThe quoted comment is pure speculation, by the way - there is no buffer overrun (at least, not in the traditional sense), they just forgot to truncate the original file on-disk before writing the cropped version.
- tyingq 4y agoAh, makes sense...I see your other comment leading to more detail also. Thanks!
- wffurr 4y agoIt wasn’t so much that they forgot but that Android 10 changed the meaning of the “w” file mode flag for open.
- Retr0id 4y agoIIUC the Markup tool was introduced after that change, but I could be wrong. (Although it was before the change was documented either way...)