fix datastore bind issue
authorChristian Grothoff <christian@grothoff.org>
Tue, 30 Jan 2018 11:50:45 +0000 (12:50 +0100)
committerChristian Grothoff <christian@grothoff.org>
Tue, 30 Jan 2018 11:50:55 +0000 (12:50 +0100)
src/datastore/plugin_datastore_sqlite.c

index d51fd3e01f34792bbacc5561ea7a8ad53826b424..380238bb5f4b5ad4fd8cd67b7015dfa745d9afc4 100644 (file)
@@ -908,6 +908,10 @@ sqlite_plugin_get_key (void *cls,
     GNUNET_SQ_query_param_end
   };
 
+  if (! use_type)
+    memset (&params[3], 0, sizeof (struct GNUNET_SQ_QueryParam));
+  if (! use_key)
+    memset (&params[2], 0, sizeof (struct GNUNET_SQ_QueryParam));
   if (random)
   {
     rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,