From 88f7e135004b0430507a131258bbe4be293c6e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Fri, 23 Dec 2022 08:35:05 +0100 Subject: [PATCH] Added alignment check --- src/map/ENC/iso8211.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/map/ENC/iso8211.cpp b/src/map/ENC/iso8211.cpp index 05d809ae..279ffded 100644 --- a/src/map/ENC/iso8211.cpp +++ b/src/map/ENC/iso8211.cpp @@ -97,6 +97,7 @@ int ISO8211::readDR(QFile &file, QVector &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;