mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
uru4000: Fix integer overflow in imaging_run_state()
‘img->key_number’ variable is originally from the device through bulk endpoint of USB. The variable is immediately assigned to ‘buf[0]’ for sending to control endpoint of the device. Here, integer overflow may occur when the ‘img->key_number’ attempts to assign a value that is outside of type range of ‘char’ to the ‘buf[0]’
This commit is contained in:
@@ -710,7 +710,7 @@ static void imaging_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data
|
||||
uint32_t key;
|
||||
uint8_t flags, num_lines;
|
||||
int i, r, to, dev2;
|
||||
char buf[5];
|
||||
unsigned char buf[5];
|
||||
|
||||
switch (fpi_ssm_get_cur_state(ssm)) {
|
||||
case IMAGING_CAPTURE:
|
||||
|
||||
Reference in New Issue
Block a user