From d8c53b12a818ff7cf82d06a1a69c395bdef85ee6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 8 Jul 2016 17:20:23 +0000 Subject: -avoid calling memcpy() with NULL argument, even if len is 0 --- src/datastore/plugin_datastore_postgres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/datastore/plugin_datastore_postgres.c') diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c index faf9885179..332a8688ba 100644 --- a/src/datastore/plugin_datastore_postgres.c +++ b/src/datastore/plugin_datastore_postgres.c @@ -946,7 +946,7 @@ postgres_plugin_get_keys (void *cls, if (sizeof (struct GNUNET_HashCode) != PQgetlength (res, i, 0)) { - memcpy (&key, + GNUNET_memcpy (&key, PQgetvalue (res, i, 0), sizeof (struct GNUNET_HashCode)); proc (proc_cls, &key, 1); -- cgit v1.2.3-70-g09d2