*((unsigned int*)(fw + statbuf.st_size - 4)) = crc;
}
+ if (check_image(fw, statbuf.st_size-4) != 0) {
+ fprintf(stderr, "corrupt firmware image found (pdata is not last entry), aborting!\n");
+ exit(1);
+ }
+
if (check_crc(fw, statbuf.st_size) == 0) {
char *newfile;