aboutsummaryrefslogtreecommitdiff
path: root/src/datacache/plugin_datacache_postgres.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-08 17:20:23 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-08 17:20:23 +0000
commitd8c53b12a818ff7cf82d06a1a69c395bdef85ee6 (patch)
tree0ebb0db416c157fcfde51a941185819dd12d51fd /src/datacache/plugin_datacache_postgres.c
parent5184c17d32a39c928c2a0fec3ee1ad098bbaa562 (diff)
downloadgnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.tar.gz
gnunet-d8c53b12a818ff7cf82d06a1a69c395bdef85ee6.zip
-avoid calling memcpy() with NULL argument, even if len is 0
Diffstat (limited to 'src/datacache/plugin_datacache_postgres.c')
-rw-r--r--src/datacache/plugin_datacache_postgres.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c
index e5b250531..147bb4223 100644
--- a/src/datacache/plugin_datacache_postgres.c
+++ b/src/datacache/plugin_datacache_postgres.c
@@ -399,7 +399,7 @@ postgres_plugin_del (void *cls)
399 } 399 }
400 size = ntohl (*(uint32_t *) PQgetvalue (res, 0, 0)); 400 size = ntohl (*(uint32_t *) PQgetvalue (res, 0, 0));
401 oid = ntohl (*(uint32_t *) PQgetvalue (res, 0, 1)); 401 oid = ntohl (*(uint32_t *) PQgetvalue (res, 0, 1));
402 memcpy (&key, PQgetvalue (res, 0, 2), sizeof (struct GNUNET_HashCode)); 402 GNUNET_memcpy (&key, PQgetvalue (res, 0, 2), sizeof (struct GNUNET_HashCode));
403 PQclear (res); 403 PQclear (res);
404 if (GNUNET_OK != 404 if (GNUNET_OK !=
405 GNUNET_POSTGRES_delete_by_rowid (plugin->dbh, 405 GNUNET_POSTGRES_delete_by_rowid (plugin->dbh,