mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-06-23 04:38:33 +02:00
secugen: Protect against invalid fw_data
This fixes an issue detected by scan build
This commit is contained in:
parent
5b34908a21
commit
726cf8a515
1 changed files with 6 additions and 0 deletions
|
|
@ -636,6 +636,12 @@ init_fw_read_cb (FpiUsbTransfer *transfer,
|
|||
else
|
||||
{
|
||||
/* All FW data received - extract image processing parameters */
|
||||
if (!self->fw_data)
|
||||
{
|
||||
fp_warn ("FW data buffer missing; skipping calibration extraction");
|
||||
fpi_ssm_next_state (transfer->ssm);
|
||||
return;
|
||||
}
|
||||
|
||||
/* BLC region offsets: 16 × int16 at fw_data[0x0e] */
|
||||
if (self->fw_data_len >= SECUGEN_BLC_OFFSETS_FW + 32)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue