Index: srv.c =================================================================== RCS file: /usr/cvsroot/asterisk/srv.c,v retrieving revision 1.9 diff -u -p -r1.9 srv.c --- srv.c 22 Jun 2004 20:11:15 -0000 1.9 +++ srv.c 10 Jul 2004 07:09:07 -0000 @@ -60,7 +60,7 @@ static int parse_srv(unsigned char *host if (res && strcmp(repl, ".")) { ast_verbose( VERBOSE_PREFIX_3 "parse_srv: SRV mapped to host %s, port %d\n", repl, ntohs(srv->portnum)); if (host) { - strncpy(host, repl, hostlen - 2); + strncpy(host, repl, hostlen - 1); host[hostlen-1] = '\0'; } if (portno) @@ -109,7 +109,7 @@ int ast_get_srv(struct ast_channel *chan ret |= ast_autoservice_stop(chan); if (ret <= 0) { - strcpy(host, ""); + host[0] = '\0'; *port = -1; return ret; }