From: Anthony Minessale Date: Thu, 24 Jan 2008 16:01:25 +0000 (+0000) Subject: don't overrun buffer (FSCORE-95) X-Git-Tag: v1.0-rc1~572 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3209e64596a031a7fd6208c823d1dcbe19b248ca;p=thirdparty%2Ffreeswitch.git don't overrun buffer (FSCORE-95) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7346 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- 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); }