]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Days are days of month, not days of week.
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 1 Oct 2009 21:20:17 +0000 (21:20 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 1 Oct 2009 21:20:17 +0000 (21:20 +0000)
Fixes regression due to AST-2009-005.
(closes issue #15765)
 Reported by: hooi
 Patches:
       20090825__issue15765.diff.txt uploaded by tilghman (license 14)
 Tested by: nic_bellamy

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

pbx.c

diff --git a/pbx.c b/pbx.c
index bded9354911c676b62996b00c8ca9ff9f1309f11..9bdda9b810092eadc76d3ed96e5c9d2bf252b1d1 100644 (file)
--- a/pbx.c
+++ b/pbx.c
@@ -4016,7 +4016,7 @@ static unsigned int get_day(char *day)
                c++;
        }
        /* Find the start */
-       if (sscanf(day, "%1d", &s) != 1) {
+       if (sscanf(day, "%2d", &s) != 1) {
                ast_log(LOG_WARNING, "Invalid day '%s', assuming none\n", day);
                return 0;
        }
@@ -4026,7 +4026,7 @@ static unsigned int get_day(char *day)
        }
        s--;
        if (c) {
-               if (sscanf(c, "%1d", &e) != 1) {
+               if (sscanf(c, "%2d", &e) != 1) {
                        ast_log(LOG_WARNING, "Invalid day '%s', assuming none\n", c);
                        return 0;
                }