mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Added alignment check
This commit is contained in:
parent
51335a0f84
commit
88f7e13500
@ -97,6 +97,7 @@ int ISO8211::readDR(QFile &file, QVector<FieldDefinition> &fields) const
|
|||||||
QByteArray fieldLen, fieldPos;
|
QByteArray fieldLen, fieldPos;
|
||||||
int len, lenSize, posSize, tagSize, offset;
|
int len, lenSize, posSize, tagSize, offset;
|
||||||
|
|
||||||
|
static_assert(sizeof(ddr) == 24, "Invalid DR alignment");
|
||||||
if (file.read((char*)&ddr, sizeof(ddr)) != sizeof(ddr))
|
if (file.read((char*)&ddr, sizeof(ddr)) != sizeof(ddr))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user