[libbluray-devel] Fix loop condition
Petri Hintukainen
git at videolan.org
Wed Jun 7 21:01:23 CEST 2017
libudfread | branch: master | Petri Hintukainen <phintuka at gmail.com> | Tue Jun 6 15:01:00 2017 +0300| [d237a30c3f115d34374ed6adf0cde672c6ff97b2] | committer: Petri Hintukainen
Fix loop condition
> http://git.videolan.org/gitweb.cgi/libudfread.git/?a=commit;h=d237a30c3f115d34374ed6adf0cde672c6ff97b2
---
src/udfread.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/udfread.c b/src/udfread.c
index 150f39d..f222973 100644
--- a/src/udfread.c
+++ b/src/udfread.c
@@ -838,8 +838,9 @@ static struct file_entry *_read_file_entry(udfread *udf,
free(buf);
/* read possible additional allocation extents */
- if (fe && fe->num_ad > 0) {
- while (fe->data.ad[fe->num_ad - 1].extent_type == ECMA_AD_EXTENT_AD) {
+ if (fe) {
+ while (fe->num_ad > 0 &&
+ fe->data.ad[fe->num_ad - 1].extent_type == ECMA_AD_EXTENT_AD) {
icb = &fe->data.ad[fe->num_ad - 1];
udf_log("_read_file_entry: reading allocation extent @%u\n", icb->lba);
More information about the libbluray-devel
mailing list