Revision
15176
Author
brian
Date
2009-10-19 13:55:52 -0500 (Mon, 19 Oct 2009)

Log Message

inforce arg checking

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/applications/mod_valet_parking/mod_valet_parking.c (15175 => 15176)


--- freeswitch/trunk/src/mod/applications/mod_valet_parking/mod_valet_parking.c	2009-10-19 15:32:12 UTC (rev 15175)
+++ freeswitch/trunk/src/mod/applications/mod_valet_parking/mod_valet_parking.c	2009-10-19 18:55:52 UTC (rev 15176)
@@ -137,6 +137,11 @@
 			const char *max = argv[4];
 			int min_i, max_i, id, in = -1;
 
+			if (argc < 5) {
+				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Usage: %s\n", VALET_APP_SYNTAX);
+				return;
+			}
+
 			if (io) {
 				if (!strcasecmp(io, "in")) {
 					in = 1;