rem: strcpy(&(name[j]), "e164.arpa.");
add: memcpy(name + j, suffix.s, suffix.len + 1);
context: int enum_query(struct sip_msg* _msg, char* _service, char* _s2){	char *user_s;	int user_len, i, j, retval;	char name[MAX_DOMAIN_SIZE];	char uri[MAX_URI_SIZE];	struct rdata* head;	struct rdata* l;	struct naptr_rdata* naptr;	str pattern, replacement, result;	char string[17];	str* service;	service = (str*)_service;	if (parse_sip_msg_uri(_msg) < 0) {		LOG(L_ERR, "enum_query(): uri parsing failed\n");		return -1;	}	if (is_e164(&(_msg->parsed_uri.user)) == -1) {		LOG(L_ERR, "enum_query(): uri user is not an E164 number\n");		return -2;	}	user_s = _msg->parsed_uri.user.s;	user_len = _msg->parsed_uri.user.len;	j = 0;	for (i = user_len - 1; i > 0; i--) {		name[j] = user_s[i];		name[j + 1] = '.';		j = j + 2;	}	strcpy(&(name[j]), "e164.arpa.");	head = get_record(name, T_NAPTR);	if (head == 0) {		DBG("enum_query(): No NAPTR record found for %s.\n", name);		return -3;	}	for (l = head; l; l = l->next) {		if (l->type != T_NAPTR) continue; /*should never happen*/		naptr = (struct naptr_rdata*)l->rdata;		if (naptr == 0) {			LOG(L_CRIT, "enum_query: BUG: null rdata\n");			free_rdata_list(head);			return -4;		}		DBG("enum_query(): order %u, pref %u, flen %u, flags '%.*s', slen %u, "		    "services '%.*s', rlen %u, regexp '%.*s'\n", naptr->order, naptr->pref,		    naptr->flags_len, (int)(naptr->flags_len), ZSW(naptr->flags), naptr->services_len,		    (int)(naptr->services_len), ZSW(naptr->services), naptr->regexp_len,		    (int)(naptr->regexp_len), ZSW(naptr->regexp));		if (sip_match(naptr, service) != 0) {			if (parse_naptr_regexp(&(naptr->regexp[0]), naptr->regexp_len,					 &pattern, &replacement) < 0) {				free_rdata_list(head); /*clean up*/				LOG(L_ERR, "enum_query(): parsing of NAPTR regexp failed\n");				return -5;			}			if ((pattern.len == 4) && (strncmp(pattern.s, "^.*$", 4) == 0)) {				DBG("enum_query(): resulted in replacement: '%.*s'\n",				    replacement.len, ZSW(replacement.s));								retval = set_uri(_msg, replacement.s, replacement.len);				free_rdata_list(head); /*clean up*/				return retval;			}			result.s = &(uri[0]);			result.len = MAX_URI_SIZE;			/* Avoid making copies of pattern and replacement */			pattern.s[pattern.len] = (char)0;			replacement.s[replacement.len] = (char)0;			/* We have already checked the size of			   _msg->parsed_uri.user.s */ 			memcpy(&(string[0]), user_s, user_len);			string[user_len] = (char)0;			if (reg_replace(pattern.s, replacement.s, &(string[0]),					&result) < 0) {				pattern.s[pattern.len] = '!';				replacement.s[replacement.len] = '!';				LOG(L_ERR, "enum_query(): regexp replace failed\n");				free_rdata_list(head); /*clean up*/				return -6;			}			DBG("enum_query(): resulted in replacement: '%.*s'\n",			    result.len, ZSW(result.s));			retval = set_uri(_msg, result.s, result.len);			pattern.s[pattern.len] = '!';			replacement.s[replacement.len] = '!';			free_rdata_list(head); /*clean up*/			return retval;		}	}	free_rdata_list(head); /*clean up*/	return -1;}