diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-08 17:20:23 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-08 17:20:23 +0000 |
commit | d8c53b12a818ff7cf82d06a1a69c395bdef85ee6 (patch) | |
tree | 0ebb0db416c157fcfde51a941185819dd12d51fd /src/datastore/plugin_datastore_postgres.c | |
parent | 5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff) | |
download | gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.tar.gz gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.zip |
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/datastore/plugin_datastore_postgres.c')
-rw-r--r-- | src/datastore/plugin_datastore_postgres.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c index faf988517..332a8688b 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, | |||
946 | if (sizeof (struct GNUNET_HashCode) != | 946 | if (sizeof (struct GNUNET_HashCode) != |
947 | PQgetlength (res, i, 0)) | 947 | PQgetlength (res, i, 0)) |
948 | { | 948 | { |
949 | memcpy (&key, | 949 | GNUNET_memcpy (&key, |
950 | PQgetvalue (res, i, 0), | 950 | PQgetvalue (res, i, 0), |
951 | sizeof (struct GNUNET_HashCode)); | 951 | sizeof (struct GNUNET_HashCode)); |
952 | proc (proc_cls, &key, 1); | 952 | proc (proc_cls, &key, 1); |