Skip to content

Commit 41096dd

Browse files
authored
Merge pull request #8434 from rimwolf-redux/bitmap
Fixed displayio/Bitmap value_count range check
2 parents 586ead3 + f5d4f1e commit 41096dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

shared-bindings/displayio/Bitmap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
13
/*
24
* This file is part of the Micro Python project, http://micropython.org/
35
*
@@ -64,7 +66,7 @@ STATIC mp_obj_t displayio_bitmap_make_new(const mp_obj_type_t *type, size_t n_ar
6466
mp_arg_check_num(n_args, n_kw, 3, 3, false);
6567
uint32_t width = mp_arg_validate_int_range(mp_obj_get_int(all_args[0]), 0, 32767, MP_QSTR_width);
6668
uint32_t height = mp_arg_validate_int_range(mp_obj_get_int(all_args[1]), 0, 32767, MP_QSTR_height);
67-
uint32_t value_count = mp_arg_validate_int_range(mp_obj_get_int(all_args[2]), 1, 65535, MP_QSTR_value_count);
69+
uint32_t value_count = mp_arg_validate_int_range(mp_obj_get_int(all_args[2]), 1, 65536, MP_QSTR_value_count);
6870
uint32_t bits = 1;
6971

7072
while ((value_count - 1) >> bits) {

0 commit comments

Comments
 (0)