]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
when parsing a text configuration option, ensure that the buffer on the stack is...
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 8 Oct 2008 22:22:09 +0000 (22:22 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 8 Oct 2008 22:22:09 +0000 (22:22 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@147681 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_dahdi.c

index 476a24c6285aa19caf9f36bc78a5ce3f29d4b42c..60b6d2d9ff3a458aa924603f264524d86e8f2174 100644 (file)
@@ -10990,8 +10990,9 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
                                        return -1;
                } else if (!strcasecmp(v->name, "buffers")) {
                        int res;
-                       char policy[8] = "";
-                       res = sscanf(v->value, "%d,%s", &confp->chan.buf_no, policy);
+                       char policy[21] = "";
+
+                       res = sscanf(v->value, "%d,%20s", &confp->chan.buf_no, policy);
                        if (res != 2) {
                                ast_log(LOG_WARNING, "Parsing buffers option data failed, using defaults.\n");
                                confp->chan.buf_no = numbufs;