From 9f761a04ba652488aabf183aebaddf9e25862491 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Sun, 8 Aug 2021 12:51:22 +0200 Subject: [PATCH] adding safeguard; if the structure is healthy this should never happen --- src/map_asn1.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/map_asn1.c b/src/map_asn1.c index c6ad33a5a..62c633544 100644 --- a/src/map_asn1.c +++ b/src/map_asn1.c @@ -523,6 +523,11 @@ bloblist_t *BlobList_to_bloblist( bloblist_t *r = result; for (int i=0; ilist.count; i++) { + // this should not happen + assert(list->list.array[i]); + if (!list->list.array[i]) + goto enomem; + if (list->list.array[i]->value.size > rest_blob_size) goto enomem; rest_blob_size -= list->list.array[i]->value.size;