Fixed struct ie_vtag misalignment access due to not packed struct

This struct must be packed (no padding).

Found with GCC's -fsanitize=undefined.
This commit is contained in:
wiire-a 2017-12-31 11:37:59 +01:00
parent 2fd91f919c
commit 6438a9cf29

View File

@ -56,7 +56,7 @@ struct ie_vtag {
#define WPS_TAG_NET_KEY_IDX_LEN 1
#define WPS_TAG_KEYWRAP_AUTH_LEN 8
uint8_t data[];
};
} __attribute__((packed));
#define VTAG_SIZE (sizeof(struct ie_vtag))
struct ie_vtag *find_vtag(void *vtagp, int vtagl, void *vidp, int vlen)