Module: sip-router Branch: master Commit: d54eb083f59fb55ccbc79e49b5b3e05426bd3795 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d54eb083...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Fri Dec 6 18:30:49 2013 +0100
pike: memset of address print buffer with proper size
---
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);