fix segfault
[oweals/gnunet.git] / src / namestore / namestore_common.c
index 72a2625aedf482bfac1798078e0a75b22551f2b5..45fccbb186e16aea65dc1aa5c33dc0b77e5de256 100644 (file)
@@ -389,6 +389,7 @@ GNUNET_NAMESTORE_string_to_value (uint32_t type,
       return GNUNET_SYSERR;
     *data = GNUNET_malloc (sizeof (GNUNET_HashCode));
     memcpy (*data, &pkey, sizeof (pkey));
+    *data_size = sizeof (GNUNET_HashCode);
     return GNUNET_OK;
   case GNUNET_NAMESTORE_TYPE_PSEU:
     *data = GNUNET_strdup (s);