element-hq / element-hq/element-android

A crash with a very specific image resolution sent without height information

Open
#8,609 1 comment 1 reaction 0 assignees View on GitHub
A-Timeline O-Uncommon S-Major T-Defect Z-Crash
Dominant language
Kotlin
Stars
3.7k
Forks
917
PR merge metrics
No merged PRs in 30d

Description

### Steps to reproduce

1. Create a 1482x50 PNG image (can contain anything, width can be increased)
2. Send it in a room
3. Copy the event source contents, and remove the height information
4. Send the modified event in a room
5. Open the room in Element
6. 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 )

### 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 (fd6a45a3), 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.