diff options
-rw-r--r-- | linux-user/elfload.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index e9a3882bef..0d07b85cb8 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -3050,7 +3050,9 @@ static int elf_core_dump(int signr, const CPUArchState *env) phdr.p_align = ELF_EXEC_PAGESIZE; bswap_phdr(&phdr, 1); - dump_write(fd, &phdr, sizeof (phdr)); + if (dump_write(fd, &phdr, sizeof(phdr)) != 0) { + goto out; + } } /* |