summaryrefslogtreecommitdiff
path: root/toxcore/friend_requests.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-04-19 17:50:10 -0400
committerirungentoo <irungentoo@gmail.com>2014-04-19 17:50:10 -0400
commit09d9d34a9300a7aab59ccde74a72cd54f4672599 (patch)
tree20a6ccb5ce9adcfe79099af45580b9b567090981 /toxcore/friend_requests.c
parent8815956f0a77e0caf506cd730e6ae18d5091b782 (diff)
Removed deprecated function from public api.
Added upper length check to friendreq_handlepacket().
Diffstat (limited to 'toxcore/friend_requests.c')
-rw-r--r--toxcore/friend_requests.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/friend_requests.c b/toxcore/friend_requests.c
index 82e51a76..c5cfa4b4 100644
--- a/toxcore/friend_requests.c
+++ b/toxcore/friend_requests.c
@@ -137,7 +137,7 @@ static int friendreq_handlepacket(void *object, uint8_t *source_pubkey, uint8_t
137{ 137{
138 Friend_Requests *fr = object; 138 Friend_Requests *fr = object;
139 139
140 if (length <= 1 + sizeof(fr->nospam)) 140 if (length <= 1 + sizeof(fr->nospam) || length > MAX_DATA_SIZE)
141 return 1; 141 return 1;
142 142
143 ++packet; 143 ++packet;