syslinux_reset_adv(syslinux_adv);
/* This command may fail legitimately */
- system("mattrib -h -r -s s:/ldlinux.sys 2>/dev/null");
+ status = system("mattrib -h -r -s s:/ldlinux.sys 2>/dev/null");
+ (void)status; /* Keep _FORTIFY_SOURCE happy */
mtp = popen("mcopy -D o -D O -o - s:/ldlinux.sys", "w");
if (!mtp ||
/* This command may fail legitimately */
sprintf(command, "mattrib -h -r -s %s 2>/dev/null", target_file);
- system(command);
+ status = system(command);
+ (void)status; /* Keep _FORTIFY_SOURCE happy */
sprintf(command, "mmove -D o -D O s:/ldlinux.sys %s", target_file);
status = system(command);
if (fseek(fp, 440, SEEK_SET))
err(1, "%s: seek error - 4", argv[0]);
- fread(&id, 4, 1, fp);
+ if (fread(&id, 1, 4, fp) != 4)
+ err(1, "%s: read error", argv[0]);
+
id = lendian_int(id);
if (!id)
{