diff options
author | Jason Parker <jparker@digium.com> | 2013-03-11 15:09:56 -0500 |
---|---|---|
committer | Jason Parker <jparker@digium.com> | 2013-03-11 15:09:56 -0500 |
commit | 483805f79570115ab95c69698792d238c1719b1b (patch) | |
tree | 6b53ab2fd2b2478f864ccc8bd1b0bfaedc4d2050 /pjsip/src/pjsip/sip_tel_uri.c | |
parent | f3ab456a17af1c89a6e3be4d20c5944853df1cb0 (diff) |
Import pjproject-2.1
Diffstat (limited to 'pjsip/src/pjsip/sip_tel_uri.c')
-rw-r--r-- | pjsip/src/pjsip/sip_tel_uri.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pjsip/src/pjsip/sip_tel_uri.c b/pjsip/src/pjsip/sip_tel_uri.c index 4120ae0..b98db57 100644 --- a/pjsip/src/pjsip/sip_tel_uri.c +++ b/pjsip/src/pjsip/sip_tel_uri.c @@ -1,4 +1,4 @@ -/* $Id: sip_tel_uri.c 3553 2011-05-05 06:14:19Z nanang $ */ +/* $Id: sip_tel_uri.c 4322 2013-01-17 10:09:09Z bennylp $ */ /* * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> @@ -182,7 +182,7 @@ static pj_ssize_t tel_uri_print( pjsip_uri_context_e context, { int printed; char *startbuf = buf; - char *endbuf = buf+size; + char *endbuf = buf+size-1; const pjsip_parser_const_t *pc = pjsip_parser_const(); PJ_UNUSED_ARG(context); @@ -217,6 +217,8 @@ static pj_ssize_t tel_uri_print( pjsip_uri_context_e context, return -1; buf += printed; + *buf = '\0'; + return (buf-startbuf); } |