Skip to content

Commit 1566b71

Browse files
committed
test that msg width/height are smaller than some reasonable maximum
1 parent b1d862b commit 1566b71

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/message.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,8 +1884,11 @@ mod tests {
18841884
if let Ok(msg) = Message::load_from_db(&t.ctx, msg_id.clone()).await {
18851885
if msg.get_viewtype() == Viewtype::Image {
18861886
has_image = true;
1887+
// just check that width/height are inside some reasonable ranges
18871888
assert!(msg.get_width() > 100);
18881889
assert!(msg.get_height() > 100);
1890+
assert!(msg.get_width() < 4000);
1891+
assert!(msg.get_height() < 4000);
18891892
}
18901893
}
18911894
}

0 commit comments

Comments
 (0)