diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 8f1a374aa4..8e31e13864 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -3588,7 +3588,7 @@ SWITCH_STANDARD_API(sofia_contact_function) newptr = newreply; /* pointer to the end of the allocated buffer for safety checks */ - bufend = newreply + allocsize - 1; + bufend = newreply + allocsize; *bufend = 0; /* go thru all the urls and replace the user part */