binmunge: warn on overflows
authorAlan Cox <alan@linux.intel.com>
Sun, 22 Mar 2015 21:47:09 +0000 (21:47 +0000)
committerAlan Cox <alan@linux.intel.com>
Sun, 22 Mar 2015 21:47:09 +0000 (21:47 +0000)
Kernel/tools/binmunge.c

index 006a0b3..0f12946 100644 (file)
@@ -239,6 +239,9 @@ static void process_stub(char *p)
 {
   int b1, b2, addr;
   char name[65];
+
+  if (strlen(p) > 4 && !isspace(p[8]))
+    fprintf(stderr, "Overflow: %s", p);
   if (sscanf(p, "%02x %04x %02x %64s", &b1, &addr, &b2, name) != 4) {
     fprintf(stderr, "Invalid relocation link %s\n", p);
     exit(1);