diff options
author | Phil <phil.buschmann@tum.de> | 2018-07-02 15:42:34 +0200 |
---|---|---|
committer | Phil <phil.buschmann@tum.de> | 2018-07-02 15:42:34 +0200 |
commit | 6ede545d597509fefcc3d4fd2ef865bc5f57603f (patch) | |
tree | 3839f25c1a4b594a5da56df47b8ef5bd25880c76 /src/gnsrecord/gnsrecord_serialization.c | |
parent | db8c5cd31a92cd18450bf9d2d595a8fd314583e0 (diff) | |
parent | bb3371542e3c1fff2c4abb4d2ba3decf925b4352 (diff) | |
download | gnunet-6ede545d597509fefcc3d4fd2ef865bc5f57603f.tar.gz gnunet-6ede545d597509fefcc3d4fd2ef865bc5f57603f.zip |
-Merge branch 'master' of ssh://gnunet.org/gnunet into gsoc2018/rest_api
Diffstat (limited to 'src/gnsrecord/gnsrecord_serialization.c')
-rw-r--r-- | src/gnsrecord/gnsrecord_serialization.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gnsrecord/gnsrecord_serialization.c b/src/gnsrecord/gnsrecord_serialization.c index a1cfbe984..934d36102 100644 --- a/src/gnsrecord/gnsrecord_serialization.c +++ b/src/gnsrecord/gnsrecord_serialization.c | |||
@@ -90,6 +90,9 @@ GNUNET_GNSRECORD_records_get_size (unsigned int rd_count, | |||
90 | { | 90 | { |
91 | size_t ret; | 91 | size_t ret; |
92 | 92 | ||
93 | if (0 == rd_count) | ||
94 | return 0; | ||
95 | |||
93 | ret = sizeof (struct NetworkRecord) * rd_count; | 96 | ret = sizeof (struct NetworkRecord) * rd_count; |
94 | for (unsigned int i=0;i<rd_count;i++) | 97 | for (unsigned int i=0;i<rd_count;i++) |
95 | { | 98 | { |
@@ -205,6 +208,9 @@ GNUNET_GNSRECORD_records_serialize (unsigned int rd_count, | |||
205 | } | 208 | } |
206 | #endif | 209 | #endif |
207 | } | 210 | } |
211 | memset (&dest[off], | ||
212 | 0, | ||
213 | dest_size-off); | ||
208 | return dest_size; | 214 | return dest_size; |
209 | } | 215 | } |
210 | 216 | ||