[Freeswitch-svn] [commit] r7346 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Thu Jan 24 11:01:25 EST 2008


Author: anthm
Date: Thu Jan 24 11:01:25 2008
New Revision: 7346

Modified:
   freeswitch/trunk/src/switch_stun.c

Log:
don't overrun buffer (FSCORE-95)

Modified: freeswitch/trunk/src/switch_stun.c
==============================================================================
--- freeswitch/trunk/src/switch_stun.c	(original)
+++ freeswitch/trunk/src/switch_stun.c	Thu Jan 24 11:01:25 2008
@@ -198,7 +198,7 @@
 {
 	uint16_t cpylen;
 
-	cpylen = attribute->length > len ? attribute->length : len;
+	cpylen = attribute->length < len ? attribute->length : len;
 	return memcpy(username, attribute->value, cpylen);
 }
 



More information about the Freeswitch-svn mailing list