提交 8f93089d 编写于 作者: P Philippe Mathieu-Daudé 提交者: Laurent Vivier

linux-user/strace: Display invalid pointer in print_timeval()

Suggested-by: NLaurent Vivier <laurent@vivier.eu>
Reviewed-by: NLaurent Vivier <laurent@vivier.eu>
Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20191021114857.20538-2-f4bug@amsat.org>
Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
上级 1645fb5a
......@@ -1243,8 +1243,10 @@ print_timeval(abi_ulong tv_addr, int last)
struct target_timeval *tv;
tv = lock_user(VERIFY_READ, tv_addr, sizeof(*tv), 1);
if (!tv)
if (!tv) {
print_pointer(tv_addr, last);
return;
}
gemu_log("{" TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "}%s",
tswapal(tv->tv_sec), tswapal(tv->tv_usec), get_comma(last));
unlock_user(tv, tv_addr, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册