mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-24 20:24:16 +00:00
FS-7214: [mod_memchace] fix seg caused by bad command argument bounds checking for flush and deleete
This commit is contained in:
1 parent
b2c6d70cc8
commit
dc071a1345
1 file changed
+2
-2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user