mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
goodixmoc: Fix template struct for required length calculation
The length is only a single byte in the transfer. However, the struct had a uint32_t in that place, breaking the sizeof() calculation and seemingly creating issues for certain lengths of user id strings (which depend on the username). Fix this by changing the type to uint8_t. Also add the initial 0x43 prefix byte and a byte of apparent padding that the struct contains. Leave the two reserved bytes at the end, as they seem to actually have a meaning (i.e. they are seemingly send in listings). This effectively makes the struct one byte smaller, bringing it down to 127 bytes from 128 bytes. Closes: #428, #404
This commit is contained in:
committed by
Benjamin Berg
parent
de46e1e4b8
commit
17ff49f85c
@@ -113,14 +113,16 @@ typedef struct _gxfp_enroll_init
|
|||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
typedef struct _template_format
|
typedef struct _template_format
|
||||||
{
|
{
|
||||||
|
uint8_t _0x43_byte;
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
uint8_t finger_index;
|
uint8_t finger_index;
|
||||||
|
uint8_t pad0;
|
||||||
uint8_t accountid[32];
|
uint8_t accountid[32];
|
||||||
uint8_t tid[32];
|
uint8_t tid[32];
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
uint32_t size;
|
uint8_t size;
|
||||||
uint8_t data[56];
|
uint8_t data[56];
|
||||||
} payload;
|
} payload;
|
||||||
uint8_t reserve[2];
|
uint8_t reserve[2];
|
||||||
} template_format_t, *ptemplate_format_t;
|
} template_format_t, *ptemplate_format_t;
|
||||||
|
|||||||
Reference in New Issue
Block a user