[asterisk-commits] coreyfarrell: trunk r407105 - in /trunk: ./ apps/app_stack.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jan 31 18:25:57 CST 2014
Author: coreyfarrell
Date: Fri Jan 31 18:25:54 2014
New Revision: 407105
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=407105
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
........
Merged revisions 407104 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/apps/app_stack.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/apps/app_stack.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_stack.c?view=diff&rev=407105&r1=407104&r2=407105
==============================================================================
--- trunk/apps/app_stack.c (original)
+++ trunk/apps/app_stack.c Fri Jan 31 18:25:54 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