diff options
author | George Joseph <george.joseph@fairview5.com> | 2016-02-25 13:17:04 -0700 |
---|---|---|
committer | George Joseph <george.joseph@fairview5.com> | 2016-02-25 13:17:04 -0700 |
commit | 6e70e8ccdb77e772ef877793e88b82daf626db2c (patch) | |
tree | 5f0cb1d7b30385d05f14561be51400abd5e6b729 /res | |
parent | 0985f443634540da9e4116a4867558d04dd04c91 (diff) |
res_sorcery_memory_cache: Fix SEGV in some CLI commands
A few of the CLI commands weren't checking for enough arguments
and were SEGVing.
Change-Id: Ie6494132ad2fe54b4f014bcdc112a37c36a9b413
Diffstat (limited to 'res')
-rw-r--r-- | res/res_sorcery_memory_cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_sorcery_memory_cache.c b/res/res_sorcery_memory_cache.c index 99db0ce9c..f2ed5d5c8 100644 --- a/res/res_sorcery_memory_cache.c +++ b/res/res_sorcery_memory_cache.c @@ -1830,7 +1830,7 @@ static char *sorcery_memory_cache_expire(struct ast_cli_entry *e, int cmd, struc } } - if (a->argc > 6) { + if (a->argc < 5 || a->argc > 6) { return CLI_SHOWUSAGE; } @@ -1884,7 +1884,7 @@ static char *sorcery_memory_cache_stale(struct ast_cli_entry *e, int cmd, struct } } - if (a->argc > 6) { + if (a->argc < 5 || a->argc > 6) { return CLI_SHOWUSAGE; } @@ -1943,7 +1943,7 @@ static char *sorcery_memory_cache_populate(struct ast_cli_entry *e, int cmd, str } } - if (a->argc > 5) { + if (a->argc != 5) { return CLI_SHOWUSAGE; } |