[asterisk-commits] dlee: branch dlee/playback-controls r389484 - in /team/dlee/playback-controls...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 22 09:55:45 CDT 2013
Author: dlee
Date: Wed May 22 09:55:41 2013
New Revision: 389484
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=389484
Log:
Input validation
Modified:
team/dlee/playback-controls/res/res_stasis_playback.c
team/dlee/playback-controls/res/stasis_http/resource_channels.c
Modified: team/dlee/playback-controls/res/res_stasis_playback.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/playback-controls/res/res_stasis_playback.c?view=diff&rev=389484&r1=389483&r2=389484
==============================================================================
--- team/dlee/playback-controls/res/res_stasis_playback.c (original)
+++ team/dlee/playback-controls/res/res_stasis_playback.c Wed May 22 09:55:41 2013
@@ -258,6 +258,10 @@
RAII_VAR(struct stasis_app_playback *, playback, NULL, ao2_cleanup);
char id[AST_UUID_STR_LEN];
+ if (skipms < 0 || offsetms < 0) {
+ return NULL;
+ }
+
ast_debug(3, "%s: Sending play(%s) command\n",
stasis_app_control_get_channel_id(control), uri);
Modified: team/dlee/playback-controls/res/stasis_http/resource_channels.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/playback-controls/res/stasis_http/resource_channels.c?view=diff&rev=389484&r1=389483&r2=389484
==============================================================================
--- team/dlee/playback-controls/res/stasis_http/resource_channels.c (original)
+++ team/dlee/playback-controls/res/stasis_http/resource_channels.c Wed May 22 09:55:41 2013
@@ -163,6 +163,20 @@
return;
}
+ if (args->skipms < 0) {
+ stasis_http_response_error(
+ response, 500, "Internal Server Error",
+ "skipms cannot be negative");
+ return;
+ }
+
+ if (args->offsetms < 0) {
+ stasis_http_response_error(
+ response, 500, "Internal Server Error",
+ "offsetms cannot be negative");
+ return;
+ }
+
language = S_OR(args->lang, snapshot->language);
playback = stasis_app_control_play_uri(control, args->media, language,
More information about the asterisk-commits
mailing list