From 52e68c096ba26c0620f78718054b20dc6c0d5306 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 29 Jul 2014 18:58:37 +0200 Subject: [PATCH] store_lookup: Make sure to always initialize the buffer in tostring(). --- src/core/store_lookup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/store_lookup.c b/src/core/store_lookup.c index ed58591..476e0e7 100644 --- a/src/core/store_lookup.c +++ b/src/core/store_lookup.c @@ -508,6 +508,8 @@ cond_tostring(sdb_store_matcher_t *m, char *buf, size_t buflen) value_str); sdb_data_free_datum(&value); } + else + snprintf(buf, buflen, ""); return buf; } /* cond_tostring */ -- 2.30.2