1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-27 21:24:47 +01:00

Added alignment check

This commit is contained in:
Martin Tůma 2022-12-23 08:35:05 +01:00
parent 51335a0f84
commit 88f7e13500

View File

@ -97,6 +97,7 @@ int ISO8211::readDR(QFile &file, QVector<FieldDefinition> &fields) const
QByteArray fieldLen, fieldPos;
int len, lenSize, posSize, tagSize, offset;
static_assert(sizeof(ddr) == 24, "Invalid DR alignment");
if (file.read((char*)&ddr, sizeof(ddr)) != sizeof(ddr))
return -1;