提交 dc071a13 authored 作者: Michael Jerris's avatar Michael Jerris

FS-7214: [mod_memchace] fix seg caused by bad command argument bounds checking…

FS-7214: [mod_memchace] fix seg caused by bad command argument bounds checking for flush and deleete
上级 b2c6d70c
......@@ -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);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论