]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Initialize an array to 0s if config option not specified.
authorJason Parker <jparker@digium.com>
Tue, 29 Jan 2008 17:41:43 +0000 (17:41 +0000)
committerJason Parker <jparker@digium.com>
Tue, 29 Jan 2008 17:41:43 +0000 (17:41 +0000)
(closes issue #11860)
Patches:
      misdn_get_config.v1.diff uploaded by IgorG (license 20)

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

channels/misdn_config.c

index d13ab0a0904f9d017662ac2efe15c555de729cfb..cb16622519bf830d78884a044de6aa780e4fd513 100644 (file)
@@ -534,7 +534,8 @@ void misdn_cfg_get (int port, enum misdn_cfg_elements elem, void *buf, int bufsi
                                        } else if (port_cfg[0][place].str) {
                                                if (!memccpy(buf, port_cfg[0][place].str, 0, bufsize))
                                                        memset(buf, 0, 1);
-                                       }
+                                       } else
+                                               memset(buf, 0, bufsize);
                                        break;
                                default:
                                        if (port_cfg[port][place].any)