diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-08 14:53:28 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-05-08 14:53:28 +0000 |
commit | 109ca49fdb9ab700b6f3af135a4d76cc72d45fb5 (patch) | |
tree | e0f85f935c9a92e5cf4576a5d1c73ea74d807e45 /channels/misdn_config.c | |
parent | a6a11262d1a84e81eda3c0469b1e0eabbb1776d2 (diff) |
Merged revisions 193263 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r193263 | dvossel | 2009-05-08 09:52:19 -0500 (Fri, 08 May 2009) | 15 lines
Merged revisions 193262 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r193262 | dvossel | 2009-05-08 09:51:09 -0500 (Fri, 08 May 2009) | 9 lines
"misdn show config" segfaults asterisk, if no MSN lists
(closes issue #14976)
Reported by: alecdavis
Patches:
misdn_config.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis, FabienToune
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@193264 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/misdn_config.c')
-rw-r--r-- | channels/misdn_config.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/misdn_config.c b/channels/misdn_config.c index 6c75b12cc..befbfb3ad 100644 --- a/channels/misdn_config.c +++ b/channels/misdn_config.c @@ -797,7 +797,9 @@ void misdn_cfg_get_config_string (int port, enum misdn_cfg_elements elem, char* for (; iter; iter = iter->next) { strncat(tempbuf, iter->msn, sizeof(tempbuf) - strlen(tempbuf) - 1); } - tempbuf[strlen(tempbuf)-2] = 0; + if (strlen(tempbuf) > 1) { + tempbuf[strlen(tempbuf)-2] = 0; + } } snprintf(buf, bufsize, " -> msns: %s", *tempbuf ? tempbuf : "none"); break; |