X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fpeerstore%2Fplugin_peerstore_sqlite.c;h=e967e2177021e059f46c8a9559c1787cc2f43be6;hb=6f1bbf8034e41837c33c5e3a7270c603a02e9d2e;hp=1695938bbb3847b87f8c8fe90d142ae269a241b6;hpb=36367311686410711f46fa3d82484a609c888acf;p=oweals%2Fgnunet.git diff --git a/src/peerstore/plugin_peerstore_sqlite.c b/src/peerstore/plugin_peerstore_sqlite.c index 1695938bb..e967e2177 100644 --- a/src/peerstore/plugin_peerstore_sqlite.c +++ b/src/peerstore/plugin_peerstore_sqlite.c @@ -104,7 +104,7 @@ peerstore_sqlite_store_record (void *cls, //FIXME: check if value exists with the same key first if(SQLITE_OK != sqlite3_bind_blob(stmt, 2, peer, sizeof(struct GNUNET_PeerIdentity), SQLITE_STATIC) - || SQLITE_OK != sqlite3_bind_text(stmt, 1, sub_system, sizeof(sub_system), SQLITE_STATIC) + || SQLITE_OK != sqlite3_bind_text(stmt, 1, sub_system, strlen(sub_system) + 1, SQLITE_STATIC) || SQLITE_OK != sqlite3_bind_blob(stmt, 3, value, size, SQLITE_STATIC)) LOG_SQLITE (plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, "sqlite3_bind");