aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2020-03-03 13:32:31 +0100
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2020-03-03 13:32:31 +0100
commitc0236414b243d7bf8a60e9906f44fe527df49631 (patch)
tree9fa656f2db737aae31e45bd5c2964a332c65bed2 /src
parentcd841b66b685604a54030ead95b2d679325d5dd8 (diff)
downloadgnunet-c0236414b243d7bf8a60e9906f44fe527df49631.tar.gz
gnunet-c0236414b243d7bf8a60e9906f44fe527df49631.zip
fix NULL ptr deref in attestations
Diffstat (limited to 'src')
-rw-r--r--src/reclaim/reclaim_attestation.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/reclaim/reclaim_attestation.c b/src/reclaim/reclaim_attestation.c
index 66da8e74a..bdf80a709 100644
--- a/src/reclaim/reclaim_attestation.c
+++ b/src/reclaim/reclaim_attestation.c
@@ -336,6 +336,13 @@ GNUNET_RECLAIM_attestation_list_deserialize (const char *data, size_t data_size)
336 ale->attestation = 336 ale->attestation =
337 GNUNET_RECLAIM_attestation_deserialize (read_ptr, 337 GNUNET_RECLAIM_attestation_deserialize (read_ptr,
338 data_size - (read_ptr - data)); 338 data_size - (read_ptr - data));
339 if (NULL == ale->attestation)
340 {
341 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
342 "Failed to deserialize malformed attestation.\n");
343 GNUNET_free (ale);
344 return al;
345 }
339 GNUNET_CONTAINER_DLL_insert (al->list_head, al->list_tail, ale); 346 GNUNET_CONTAINER_DLL_insert (al->list_head, al->list_tail, ale);
340 att_len = GNUNET_RECLAIM_attestation_serialize_get_size (ale->attestation); 347 att_len = GNUNET_RECLAIM_attestation_serialize_get_size (ale->attestation);
341 read_ptr += att_len; 348 read_ptr += att_len;