From 72f03654589bc7505511a479d0f7eb11d6d23102 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 16 Oct 2024 14:04:59 +0200 Subject: [PATCH] Bug fix: Empty AAIP value spoiled decoding of all AAIP attributes --- libisofs/aaip_0_2.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libisofs/aaip_0_2.c b/libisofs/aaip_0_2.c index 53fd822..9699341 100644 --- a/libisofs/aaip_0_2.c +++ b/libisofs/aaip_0_2.c @@ -7,7 +7,7 @@ See libisofs/aaip_0_2.h http://libburnia-project.org/wiki/AAIP - Copyright (c) 2009 - 2019 Thomas Schmitt + Copyright (c) 2009 - 2024 Thomas Schmitt This file is part of the libisofs project; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 @@ -1321,8 +1321,11 @@ static int aaip_consume_aa_data(struct aaip_state *aaip, while(*num_data > 0 && aaip->aa_missing > 0) { if(aaip->rec_head_missing > 0) { aaip_consume_rec_head(aaip, data, num_data, 0); - if(*num_data == 0 || aaip->aa_missing <= 0) - return(1); + if(*num_data == 0 || aaip->aa_missing <= 0) { + if(aaip->rec_head_missing > 0 || aaip->rec_missing > 0) + return(1); + /* empty record data: go on with processing it */ + } } aaip_consume_rec_data(aaip, data, num_data, 0); }