Skip to content

Commit

Permalink
Merge pull request #125 from thnkslprpt:fix-87-check-return-value-of-…
Browse files Browse the repository at this point in the history
…stat

Fix #87, Check return value of stat()
  • Loading branch information
dzbaker committed Jul 2, 2024
2 parents 2c10360 + 836486f commit 1ca5d27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion elf2cfetbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,11 @@ int32 OpenDstFile(void)
return FAILED;
}

stat(DstFilename, &dststat);
if (stat(DstFilename, &dststat) != 0)
{
printf("%s: Error retrieving file status after chmod\n", DstFilename);
}

if (Verbose)
printf("%s: Destination file permissions after chmod = 0x%X\n", DstFilename, dststat.st_mode);
}
Expand Down

0 comments on commit 1ca5d27

Please sign in to comment.