Code

store_lookup: Make sure to always initialize the buffer in tostring().
authorSebastian Harl <sh@tokkee.org>
Tue, 29 Jul 2014 16:58:37 +0000 (18:58 +0200)
committerSebastian Harl <sh@tokkee.org>
Tue, 29 Jul 2014 16:58:37 +0000 (18:58 +0200)
src/core/store_lookup.c

index ed585914cd38bee517d0dddfd84e47bfcbb6b980..476e0e717d9fb5c788651722d5e2a4948dcd696e 100644 (file)
@@ -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, "<unknown>");
        return buf;
 } /* cond_tostring */