Merged revisions 100930 via svnmerge from
authorJason Parker <jparker@digium.com>
Tue, 29 Jan 2008 17:42:48 +0000 (17:42 +0000)
committerJason Parker <jparker@digium.com>
Tue, 29 Jan 2008 17:42:48 +0000 (17:42 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r100930 | qwell | 2008-01-29 11:41:43 -0600 (Tue, 29 Jan 2008) | 6 lines

Initialize an array to 0s if config option not specified.

(closes issue #11860)
Patches:
      misdn_get_config.v1.diff uploaded by IgorG (license 20)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100931 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/misdn_config.c

index bbe23fb..ec74d92 100644 (file)
@@ -537,7 +537,8 @@ void misdn_cfg_get(int port, enum misdn_cfg_elements elem, void *buf, int bufsiz
                                                ast_copy_string(buf, port_cfg[port][place].str, bufsize);
                                        } else if (port_cfg[0][place].str) {
                                                ast_copy_string(buf, port_cfg[0][place].str, bufsize);
-                                       }
+                                       } else
+                                               memset(buf, 0, bufsize);
                                        break;
                                default:
                                        if (port_cfg[port][place].any)