From d010eb465164c7cb6156249f74b774ad40849fb4 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 16 Jul 2011 14:43:01 +0200 Subject: 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 --- openbsc/src/ipaccess/ipaccess-firmware.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openbsc/src/ipaccess/ipaccess-firmware.c') 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; } -- cgit v1.2.3