From: Tilghman Lesher Date: Thu, 1 Oct 2009 21:20:17 +0000 (+0000) Subject: Days are days of month, not days of week. X-Git-Tag: 1.2.38~2^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78130b6b77a0fbc5ce31403125fab1e7bd3488f4;p=thirdparty%2Fasterisk.git Days are days of month, not days of week. 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 --- diff --git a/pbx.c b/pbx.c index bded935491..9bdda9b810 100644 --- 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; }