Steps to reproduce
- Create a 1482x50 PNG image (can contain anything, width can be increased)
- Send it in a room
- Copy the event source contents, and remove the height information
- Send the modified event in a room
- Open the room in Element
- Element Crashes
Example modified event content:
{
"body": "image copy.png",
"info": {
"size": 104,
"mimetype": "image/png",
"w": 1482,
"xyz.amorgan.blurhash": "LCTI?ro1fQo1|cfQfQfQfQfQfQfQ"
},
"msgtype": "m.image",
"url": "mxc://jacksonchen666.com/FLZgfEyOmbktQhhhVVFzSIUU"
}
For a room that already has the image: https://matrix.to/#/#an-image-that-crashes-element-android:jacksonchen666.com (or https://matrix.to/#/!EjEyPeaBidZysyKdNG:jacksonchen666.com/$u12k1V9INN81Xsekwge8muJ81ydKA3xKBzHYVAbcBDg?via=jacksonchen666.com)
Outcome
What did you expect?
The app doesn't crash, and shows the image
What happened instead?
The app crashes, and doesn't show the image
Your phone model
FP4 (Fairphone 4)
Operating system version
Android 12, /e/ OS version 1.13-s-20230724313396-stable-FP4
Application version and app store
Element 1.6.5 [40106052] (F-fd6a45a3), Matrix SDK Version 1.6.5 (fd6a45a), Crypto version Rust SDK 0.6.0 (3fd55c0), Vodozeman 0.4.0, from F-Droid (F-Droid Basic)
Homeserver
Synapse 1.89.0
Will you send logs?
Yes
Are you willing to provide a PR?
No
Steps to reproduce
Example modified event content:
For a room that already has the image: https://matrix.to/#/#an-image-that-crashes-element-android:jacksonchen666.com (or https://matrix.to/#/!EjEyPeaBidZysyKdNG:jacksonchen666.com/$u12k1V9INN81Xsekwge8muJ81ydKA3xKBzHYVAbcBDg?via=jacksonchen666.com)
Outcome
What did you expect?
The app doesn't crash, and shows the image
What happened instead?
The app crashes, and doesn't show the image
Your phone model
FP4 (Fairphone 4)
Operating system version
Android 12, /e/ OS version 1.13-s-20230724313396-stable-FP4
Application version and app store
Element 1.6.5 [40106052] (F-fd6a45a3), Matrix SDK Version 1.6.5 (fd6a45a), Crypto version Rust SDK 0.6.0 (3fd55c0), Vodozeman 0.4.0, from F-Droid (F-Droid Basic)
Homeserver
Synapse 1.89.0
Will you send logs?
Yes
Are you willing to provide a PR?
No