From 91838f8c2d3f3bb30f23d20aeba4691ce797fb45 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Tue, 18 Mar 2014 20:50:40 -0400 Subject: [PATCH] Fixed issue where other could send a bad userstatus. --- toxcore/Messenger.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 9fa0c607..738f0a2f 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -1969,6 +1969,9 @@ void do_friends(Messenger *m) USERSTATUS status = data[0]; + if (status >= USERSTATUS_INVALID) + break; + if (m->friend_userstatuschange) m->friend_userstatuschange(m, i, status, m->friend_userstatuschange_userdata);