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/pq | |
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/pq')
-rw-r--r-- | src/pq/pq_result_helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c index bb6a8fa9b..78a375060 100644 --- a/src/pq/pq_result_helper.c +++ b/src/pq/pq_result_helper.c | |||
@@ -96,7 +96,7 @@ extract_varsize_blob (void *cls, | |||
96 | *dst_size = len; | 96 | *dst_size = len; |
97 | idst = GNUNET_malloc (len); | 97 | idst = GNUNET_malloc (len); |
98 | *((void **) dst) = idst; | 98 | *((void **) dst) = idst; |
99 | memcpy (idst, | 99 | GNUNET_memcpy (idst, |
100 | res, | 100 | res, |
101 | len); | 101 | len); |
102 | return GNUNET_OK; | 102 | return GNUNET_OK; |
@@ -181,7 +181,7 @@ extract_fixed_blob (void *cls, | |||
181 | row, | 181 | row, |
182 | fnum); | 182 | fnum); |
183 | GNUNET_assert (NULL != res); | 183 | GNUNET_assert (NULL != res); |
184 | memcpy (dst, | 184 | GNUNET_memcpy (dst, |
185 | res, | 185 | res, |
186 | len); | 186 | len); |
187 | return GNUNET_OK; | 187 | return GNUNET_OK; |