From 3209e64596a031a7fd6208c823d1dcbe19b248ca Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 24 Jan 2008 16:01:25 +0000 Subject: [PATCH] don't overrun buffer (FSCORE-95) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7346 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_stun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_stun.c b/src/switch_stun.c index 1333335830..37e6f973bb 100644 --- a/src/switch_stun.c +++ b/src/switch_stun.c @@ -198,7 +198,7 @@ SWITCH_DECLARE(char *) switch_stun_packet_attribute_get_username(switch_stun_pac { uint16_t cpylen; - cpylen = attribute->length > len ? attribute->length : len; + cpylen = attribute->length < len ? attribute->length : len; return memcpy(username, attribute->value, cpylen); }