diff options
author | Peter (Stig) Edwards <thatsafunnyname@gmail.com> | 2017-05-05 13:27:02 +0100 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2017-05-22 22:38:41 -0700 |
commit | e3eb73d016127fa6ebae3dfbf70a2a4cf5254d59 (patch) | |
tree | c8924218f7f825594858d0be9b6c8c9f6988d5ae /slabs.c | |
parent | 1afac9c46fb8bfd08ee3e44aad8de544a2151bbe (diff) | |
download | memcached-e3eb73d016127fa6ebae3dfbf70a2a4cf5254d59.tar.gz |
Avoid segfault if idle_timeout value is missing.
If memcached is called without a numeric argument for the idle_timeout option, so:
-o idle_timeout
and not:
-o idle_timeout=60
it segfaults inside stdlib/strtol_l.c:: ____strtol_l_internal from stdlib.h::atoi from the IDLE_TIMEOUT case.
I am using glibc-2.12 on RHEL6. I think atoi(NULL) is undefined behaviour.
This change guards against this for the the idle_timeout option, in the same manner as the cases that use the subopts_value, printing that the numeric argument is missing for the idle_timeout option.
Diffstat (limited to 'slabs.c')
0 files changed, 0 insertions, 0 deletions