--- bristuff-0.2.0-RC8b-CVS/asterisk/channels/chan_sip.c.orig 2005-05-03 18:41:18.000000000 +0200 +++ bristuff-0.2.0-RC8b-CVS/asterisk/channels/chan_sip.c 2005-05-04 00:21:15.000000000 +0200 @@ -3292,7 +3292,8 @@ } hn = strcspn(h, ":;>"); if (hn > (sizeof(hostname) - 1)) hn = sizeof(hostname) - 1; - ast_copy_string(hostname, h, hn); + ast_copy_string(hostname, h, hn + 1); // Add 1 by Diego + ast_verbose( "%s:%d copy h=->%s<- in hostname=>->%s<-\n", __FILE__,__LINE__,h,hostname); h+=hn; /* Is "port" present? if not default to 5060 */ --- bristuff-0.2.0-RC8b-CVS/asterisk/utils.c.orig 2005-05-04 00:18:31.000000000 +0200 +++ bristuff-0.2.0-RC8b-CVS/asterisk/utils.c 2005-05-03 23:49:25.000000000 +0200 @@ -420,11 +420,15 @@ void ast_copy_string(char *dst, const char *src, size_t size) { + char *aux=dst; while (*src && size--) *dst++ = *src++; if (__builtin_expect(!size, 0)) dst--; *dst = '\0'; + if (strstr(aux,"192")) { + printf("%s:%d found: ->%s<-\n",__FILE__,__LINE__,aux); + } } /* Case-insensitive substring matching */