aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/ipaccess
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-07-16 14:43:01 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-07-16 14:43:01 +0200
commitd010eb465164c7cb6156249f74b774ad40849fb4 (patch)
tree6e04e83e33de588c488f46cc60ea6a0590e884dc /openbsc/src/ipaccess
parent74902c5435aebd2e6acb1a5b3f9fa2fcc1157a2d (diff)
ipaccess-firmware: Fix dumping the wrong header fields
We want to compare the file more_magic[0] and more_magic[1] with the static more_magic array to see where the difference is. src/ipaccess/ipaccess-firmware.c +64 ipaccess_analyze_file(26) warn: buffer overflow 'firmware_header->more_magic' 2 <= 2 src/ipaccess/ipaccess-firmware.c +64 ipaccess_analyze_file(26) warn: buffer overflow 'firmware_header->more_magic' 2 <= 3
Diffstat (limited to 'openbsc/src/ipaccess')
-rw-r--r--openbsc/src/ipaccess/ipaccess-firmware.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/ipaccess/ipaccess-firmware.c b/openbsc/src/ipaccess/ipaccess-firmware.c
index 6d391075c..5f55bb526 100644
--- a/openbsc/src/ipaccess/ipaccess-firmware.c
+++ b/openbsc/src/ipaccess/ipaccess-firmware.c
@@ -59,9 +59,9 @@ int ipaccess_analyze_file(int fd, const unsigned int st_size, const unsigned int
}
if (memcmp(firmware_header->more_magic, more_magic, 2) != 0) {
- fprintf(stderr, "Wrong more magic. Got: 0x%x %x %x %x\n",
+ fprintf(stderr, "Wrong more magic. Got: 0x%x 0x%x vs. 0x%x 0x%x\n",
firmware_header->more_magic[0] & 0xff, firmware_header->more_magic[1] & 0xff,
- firmware_header->more_magic[2] & 0xff, firmware_header->more_magic[3] & 0xff);
+ more_magic[0], more_magic[1]);
return -1;
}