提交 b8f78820 编写于 作者: J Johannes Berg 提交者: Richard Weinberger

um: Avoid using uninitialized regs

In timer_real_alarm_handler(), regs is only initialized if
the context argument is non-NULL, also initialize in the
other case.
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Acked-by: NAnton Ivanov <anton.ivanov@cambridgegreys.co.uk>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 68c15a2b
......@@ -10,6 +10,7 @@
#include <stdarg.h>
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <strings.h>
#include <as-layout.h>
#include <kern_util.h>
......@@ -88,6 +89,8 @@ static void timer_real_alarm_handler(mcontext_t *mc)
if (mc != NULL)
get_regs_from_mc(&regs, mc);
else
memset(&regs, 0, sizeof(regs));
timer_handler(SIGALRM, NULL, &regs);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册