From b0b5edc5730bd359e83561de4e1b577a37f2e668 Mon Sep 17 00:00:00 2001 From: Paul Gardner-Stephen Date: Tue, 31 May 2022 16:35:33 +0930 Subject: [PATCH] allow rhizome manifest signature blocks >255 bytes --- rhizome_crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rhizome_crypto.c b/rhizome_crypto.c index 8f570ce8..558f54a3 100644 --- a/rhizome_crypto.c +++ b/rhizome_crypto.c @@ -449,7 +449,7 @@ int rhizome_manifest_extract_signature(rhizome_manifest *m, unsigned *ofs) assert((*ofs) < m->manifest_all_bytes); const unsigned char *sig = m->manifestdata + *ofs; uint8_t sigType = m->manifestdata[*ofs]; - uint8_t len = (sigType << 2) + 4 + 1; + uint16_t len = (sigType << 2) + 4 + 1; if (*ofs + len > m->manifest_all_bytes) { WARNF("Invalid signature at offset %u: type=%#02x gives len=%u that overruns manifest size", *ofs, sigType, len);