[ipaccess] Attempt to read the header entries..
diff --git a/openbsc/src/ipaccess/ipaccess-firmware.c b/openbsc/src/ipaccess/ipaccess-firmware.c
index 5cf99d4..5df3a38 100644
--- a/openbsc/src/ipaccess/ipaccess-firmware.c
+++ b/openbsc/src/ipaccess/ipaccess-firmware.c
@@ -19,6 +19,8 @@
  *
  */
 
+#include <openbsc/debug.h>
+
 #include <arpa/inet.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -41,6 +43,12 @@
 	/* stuff i don't know */
 } __attribute__((packed));
 
+struct sdp_header_entry {
+	u_int8_t entry[138];
+} __attribute__((packed));
+
+static_assert(sizeof(struct sdp_header_entry) == 138, right_entry);
+
 /* more magic, the second "int" in the header */
 static char more_magic[] = { 0x10, 0x02, 0x00, 0x0 };
 
@@ -87,6 +95,11 @@
 		fprintf(stderr, "The filesize and the header do not match.\n");
 		return;
 	}
+
+	if (ntohs(firmware_header->part_length) % PART_LENGTH != 0) {
+		fprintf(stderr, "The part length seems to be wrong.\n");
+		return;
+	}
 }
 
 int main(int argc, char** argv)