mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
uru4000: Fix shifting using unsigned types
../libfprint/drivers/uru4000.c:743:35: runtime error: left shift of 138 by 24
places cannot be represented in type 'int'
#0 0x7fa3e696e06d in imaging_run_state ../libfprint/drivers/uru4000.c:743
#1 0x7fa3e6a366f6 in __ssm_call_handler ../libfprint/fpi-ssm.c:254
#2 0x7fa3e6a38cc8 in fpi_ssm_next_state ../libfprint/fpi-ssm.c:465
#3 0x7fa3e696bd07 in sm_read_reg_cb ../libfprint/drivers/uru4000.c:515
#4 0x7fa3e6a3db74 in transfer_finish_cb ../libfprint/fpi-usb-transfer.c:352
#5 0x7fa3ed9b9862 in g_task_return_now ../../glib/gio/gtask.c:1363
#6 0x7fa3ed9b989c in complete_in_idle_cb ../../glib/gio/gtask.c:1377
#7 0x7fa3ede4a70b in g_main_dispatch ../../glib/glib/gmain.c:3373
#8 0x7fa3ede4c8de in g_main_context_dispatch_unlocked ../../glib/glib/gmain.c:4224
#9 0x7fa3ede4c8de in g_main_context_iterate_unlocked ../../glib/glib/gmain.c:4289
#10 0x7fa3ede4cfef in g_main_context_iteration ../../glib/glib/gmain.c:4354
#11 0x7fa3e68d4a1b in fp_device_capture_sync ../libfprint/fp-device.c:2048
This commit is contained in:
committed by
Marco Trevisan
parent
d8e0791554
commit
41949db6ce
@@ -738,9 +738,9 @@ imaging_run_state (FpiSsm *ssm, FpDevice *_dev)
|
|||||||
|
|
||||||
case IMAGING_DECODE:
|
case IMAGING_DECODE:
|
||||||
key = self->last_reg_rd[0];
|
key = self->last_reg_rd[0];
|
||||||
key |= self->last_reg_rd[1] << 8;
|
key |= (uint32_t) self->last_reg_rd[1] << 8;
|
||||||
key |= self->last_reg_rd[2] << 16;
|
key |= (uint32_t) self->last_reg_rd[2] << 16;
|
||||||
key |= self->last_reg_rd[3] << 24;
|
key |= (uint32_t) self->last_reg_rd[3] << 24;
|
||||||
key ^= self->img_enc_seed;
|
key ^= self->img_enc_seed;
|
||||||
|
|
||||||
fp_dbg ("encryption id %02x -> key %08x", img->key_number, key);
|
fp_dbg ("encryption id %02x -> key %08x", img->key_number, key);
|
||||||
|
|||||||
Reference in New Issue
Block a user