[asterisk-commits] coreyfarrell: branch 12 r407104 - in /branches/12: ./ apps/app_stack.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jan 31 18:24:57 CST 2014
Author: coreyfarrell
Date: Fri Jan 31 18:24:55 2014
New Revision: 407104
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=407104
Log:
app_stack: protect against missing parameters to STACK_PEEK and LOCAL_PEEK
STACK_PEEK requires 2 parameters and LOCAL_PEEK requires 1 parameter. This
protects against situations where those parameters are blank or missing by
logging an error and returning.
(closes issue ASTERISK-23220)
Reported by: James Sharp
........
Merged revisions 407100 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 407103 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
branches/12/ (props changed)
branches/12/apps/app_stack.c
Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: branches/12/apps/app_stack.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/apps/app_stack.c?view=diff&rev=407104&r1=407103&r2=407104
==============================================================================
--- branches/12/apps/app_stack.c (original)
+++ branches/12/apps/app_stack.c Fri Jan 31 18:24:55 2014
@@ -784,6 +784,12 @@
}
AST_STANDARD_RAW_ARGS(args, data);
+
+ if (ast_strlen_zero(args.n) || ast_strlen_zero(args.name)) {
+ ast_log(LOG_ERROR, "LOCAL_PEEK requires parameters n and varname\n");
+ return -1;
+ }
+
n = atoi(args.n);
*buf = '\0';
@@ -822,6 +828,11 @@
data = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, data);
+
+ if (ast_strlen_zero(args.n) || ast_strlen_zero(args.which)) {
+ ast_log(LOG_ERROR, "STACK_PEEK requires parameters n and which\n");
+ return -1;
+ }
n = atoi(args.n);
if (n <= 0) {
More information about the asterisk-commits
mailing list