Skip to content
Snippets Groups Projects
Commit 86d63dc2 authored by David Vossel's avatar David Vossel
Browse files

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: https://origsvn.digium.com/svn/asterisk/trunk@193263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 7893ab8f
No related branches found
No related tags found
No related merge requests found
...@@ -821,7 +821,9 @@ void misdn_cfg_get_config_string (int port, enum misdn_cfg_elements elem, char* ...@@ -821,7 +821,9 @@ void misdn_cfg_get_config_string (int port, enum misdn_cfg_elements elem, char*
for (; iter; iter = iter->next) { for (; iter; iter = iter->next) {
strncat(tempbuf, iter->msn, sizeof(tempbuf) - strlen(tempbuf) - 1); 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"); snprintf(buf, bufsize, " -> msns: %s", *tempbuf ? tempbuf : "none");
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment