mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-09-10 21:06:51 +00:00
goodixmoc: Handle cases in which the header lenght is smaller than CRC size
Reported by: Keith Linneman (LinnemanLabs)
This commit is contained in:
committed by
Marco Trevisan
parent
19719bf2da
commit
d9374963cd
@@ -253,6 +253,9 @@ gx_proto_parse_header (FpiByteReader *reader,
|
||||
if (!fpi_byte_reader_get_uint8 (reader, &pheader->rev_crc8))
|
||||
g_return_val_if_reached (-1);
|
||||
|
||||
if (pheader->len < PACKAGE_CRC_SIZE)
|
||||
return -1;
|
||||
|
||||
pheader->len -= PACKAGE_CRC_SIZE;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user