Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8f78820 authored by Johannes Berg's avatar Johannes Berg Committed by Richard Weinberger
Browse files

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: default avatarJohannes Berg <johannes.berg@intel.com>
Acked-by: default avatarAnton Ivanov <anton.ivanov@cambridgegreys.co.uk>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 68c15a2b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
}