should not read beyond end of buffer for strlen(cache_name) > 31
Bug reported by: Jim Meyering
Signed-off-by: sanoj <sunnikrishnan@stec-inc.com>