From dc071a1345a75250665b853c4d9f640cb560db84 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 29 Jan 2015 10:41:51 -0600 Subject: [PATCH] FS-7214: [mod_memchace] fix seg caused by bad command argument bounds checking for flush and deleete --- src/mod/applications/mod_memcache/mod_memcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_memcache/mod_memcache.c b/src/mod/applications/mod_memcache/mod_memcache.c index a5a5324e93..d7c3f957b9 100644 --- a/src/mod/applications/mod_memcache/mod_memcache.c +++ b/src/mod/applications/mod_memcache/mod_memcache.c @@ -357,7 +357,7 @@ SWITCH_STANDARD_API(memcache_function) } else if (!strcasecmp(subcmd, "delete") && argc > 1) { key = argv[1]; if (argc > 2) { - expires_str = argv[3]; + expires_str = argv[2]; expires = (time_t) strtol(expires_str, NULL, 10); } rc = memcached_delete(memcached, key, strlen(key), expires); @@ -368,7 +368,7 @@ SWITCH_STANDARD_API(memcache_function) } } else if (!strcasecmp(subcmd, "flush")) { if (argc > 1) { - expires_str = argv[3]; + expires_str = argv[1]; expires = (time_t) strtol(expires_str, NULL, 10); } rc = memcached_flush(memcached, expires);