ipa-firmware: Look at the table offset
* The two dummy bytes appear to be an offset, check that
they are zero and refuse to work when they are not.
diff --git a/openbsc/src/ipaccess/ipaccess-firmware.c b/openbsc/src/ipaccess/ipaccess-firmware.c
index e0695a6..4975b88 100644
--- a/openbsc/src/ipaccess/ipaccess-firmware.c
+++ b/openbsc/src/ipaccess/ipaccess-firmware.c
@@ -74,6 +74,13 @@
INIT_LLIST_HEAD(&header->header_list);
llist_add(&header->entry, list);
+ if (ntohs(firmware_header->table_offset) != 0) {
+ fprintf(stderr, "The table offset is not zero. That is not supported: 0x%x at 0x%x\n",
+ ntohs(firmware_header->table_offset), base_offset);
+ return -1;
+ }
+
+
if (ntohs(firmware_header->part_length) % PART_LENGTH != 0) {
fprintf(stderr, "The part length seems to be wrong.\n");
return -1;