rem: memcpy(user_name.s + user.len, domain.s, domain.len);
add: memcpy(user_name.s + user.len + 1, domain.s, domain.len);
context: int radius_is_user_in(struct sip_msg* _m, char* _hf, char* _group){	str *grp, user_name, user, domain, uri;	dig_cred_t* cred;	int hf_type;	UINT4 service;	VALUE_PAIR *send, *received;	static char msg[4096];	struct hdr_field* h;	struct sip_uri puri;	grp = (str*)_group; /* via fixup */	send = received = 0;	hf_type = (int)_hf;	switch(hf_type) {	case 1: /* Request-URI */		if (get_request_uri(_m, &uri) < 0) {			LOG(L_ERR, "radius_is_user_in(): Error while extracting Request-URI\n");			return -1;		}		break;	case 2: /* To */		if (get_to_uri(_m, &uri) < 0) {			LOG(L_ERR, "radius_is_user_in(): Error while extracting To\n");			return -2;		}		break;	case 3: /* From */		if (get_from_uri(_m, &uri) < 0) {			LOG(L_ERR, "radius_is_user_in(): Error while extracting From\n");			return -3;		}		break;	case 4: /* Credentials */		get_authorized_cred(_m->authorization, &h);		if (!h) {			get_authorized_cred(_m->proxy_auth, &h);			if (!h) {				LOG(L_ERR, "radius_is_user_in(): No authorized credentials found (error in scripts)\n");				return -4;			}		}		cred = &((auth_body_t*)(h->parsed))->digest;		break;	}	if (hf_type != 4) {		if (parse_uri(uri.s, uri.len, &puri) < 0) {			LOG(L_ERR, "radius_is_user_in(): Error while parsing URI\n");			return -5;		}		user = puri.user;		domain = puri.host;	} else {		user = cred->username.user;		domain = cred->realm;	}			user_name.len = user.len + domain.len + 1;	user_name.s = (char*)pkg_malloc(user_name.len);	if (!user_name.s) {		LOG(L_ERR, "radius_is_user_in(): No memory left\n");		return -6;	}		memcpy(user_name.s, user.s, user.len);	user_name.s[user.len] = '@';	memcpy(user_name.s + user.len, domain.s, domain.len);		if (!rc_avpair_add(&send, PW_USER_NAME, user_name.s, user_name.len)) {		LOG(L_ERR, "radius_is_user_in(): Error adding PW_USER_NAME\n");		rc_avpair_free(send);		pkg_free(user_name.s);		return -7;	}	pkg_free(user_name.s);	if (!rc_avpair_add(&send, PW_SIP_GROUP, grp->s, grp->len)) {		LOG(L_ERR, "radius_is_user_in(): Error adding PW_SIP_GROUP\n");	 	return -8;  		}	service = PW_GROUP_CHECK;	if (!rc_avpair_add(&send, PW_SERVICE_TYPE, &service, 0)) {		LOG(L_ERR, "radius_is_user_in(): Error adding PW_SERVICE_TYPE\n");		rc_avpair_free(send);	 	return -9;  		}	if (rc_auth(0, send, &received, msg) == OK_RC) {		DBG("radius_is_user_in(): Success\n");		rc_avpair_free(send);		rc_avpair_free(received);		return 1;	} else {		DBG("radius_is_user_in(): Failure\n");		rc_avpair_free(send);		rc_avpair_free(received);		return -11;	}}