提交 772034b6 编写于 作者: P Peter Maydell 提交者: Riku Voipio

linux-user: Check dump_write() return in elf_core_dump()

One of the calls to dump_write() in elf_core_dump() was missing
a check for failure (spotted by Coverity). Add the check to
bring it into line with the other calls from this function.
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
上级 e5a869ed
......@@ -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;
}
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册