Module: sip-router Branch: 4.0 Commit: 58206a77d9ba2335793f66adc27f4eb89e062bb9 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=58206a77d9ba2335793f66adc27f4eb89e062bb9
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: Fri Dec 6 18:30:49 2013 +0100 pike: memset of address print buffer with proper size (cherry picked from commit d54eb083f59fb55ccbc79e49b5b3e05426bd3795) --- modules/pike/pike_top.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/pike/pike_top.c b/modules/pike/pike_top.c index c3d001e..8399602 100644 --- a/modules/pike/pike_top.c +++ b/modules/pike/pike_top.c @@ -13,14 +13,15 @@ static struct TopListItem_t *top_list_root = 0; static struct TopListItem_t *top_list_iter = 0; -static char buff[128]; +#define PIKE_BUFF_SIZE 128 +static char buff[PIKE_BUFF_SIZE]; struct TopListItem_t *pike_top_get_root() { return top_list_root; } char *pike_top_print_addr( unsigned char *ip, int iplen, char *buff, int buffsize ) { unsigned short *ipv6_ptr = (unsigned short *)ip; - memset( buff, 0, sizeof(buff)); + memset(buff, 0, PIKE_BUFF_SIZE*sizeof(char)); DBG("pike:top:print_addr(iplen: %d, buffsize: %d)", iplen, buffsize); _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
