From fe61eeff5cc6716f6d2e15e36f7c8d1bfd372060 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Wed, 16 Jun 2021 04:23:27 +0000 Subject: [PATCH] import udftools-2.3-2.el8 --- SOURCES/udftools-2.3-backported_fixes.patch | 69 +++++++++++++++++++++ SPECS/udftools.spec | 7 ++- 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/SOURCES/udftools-2.3-backported_fixes.patch b/SOURCES/udftools-2.3-backported_fixes.patch index 112fbc0..94be4b3 100644 --- a/SOURCES/udftools-2.3-backported_fixes.patch +++ b/SOURCES/udftools-2.3-backported_fixes.patch @@ -286,3 +286,72 @@ index 58d810a..0b9e4a7 100644 } else { + +From 7a432b0bcd76cbd6a79925cde213f5d9073df137 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pali=20Roh=C3=A1r?= +Date: Sat, 12 Jun 2021 12:09:05 +0200 +Subject: [PATCH] wrudf: Fix parsing Volume Descriptor Sequence + +Fixes reading Reserve Volume Descriptor Sequence and fixes crashing when +readTaggedBlock() returns NULL. +--- + wrudf/wrudf.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/wrudf/wrudf.c b/wrudf/wrudf.c +index 79ca383..7a500c9 100644 +--- a/wrudf/wrudf.c ++++ b/wrudf/wrudf.c +@@ -93,6 +93,7 @@ void + initialise(char *devicename) + { + uint32_t i, len, blkno, lastblk, size; ++ int inMainSeq; + long_ad *fsdAd; + short_ad *adSpaceMap; + struct sparablePartitionMap *spm; +@@ -158,17 +159,17 @@ initialise(char *devicename) + /* read Volume Descriptor Sequence */ + blkno = extentMainVolDescSeq.extLocation; + len = extentMainVolDescSeq.extLength; ++ inMainSeq = 1; + + for( i = 0; i < len; blkno++, i += 2048 ) { +- int inMainSeq = 1; +- + if( (p = readTaggedBlock(blkno, ABSOLUTE)) == NULL ) { + if( !inMainSeq ) + fail("Volume Descriptor Sequences read failure\n"); +- blkno = extentRsrvVolDescSeq.extLocation; ++ blkno = extentRsrvVolDescSeq.extLocation - 1; + len = extentRsrvVolDescSeq.extLength; + inMainSeq = 0; +- i = 0; ++ i = (uint32_t) -2048; ++ continue; + } + switch( p->descTag.tagIdent ) { + case TAG_IDENT_PVD: + +From b08c75d234d69b2d1cf07dc639d432db767a775f Mon Sep 17 00:00:00 2001 +From: Jiri Kucera +Date: Sun, 13 Jun 2021 19:37:47 +0200 +Subject: [PATCH] wrudf-cdr.c: Exit on allocation failure + +--- + wrudf/wrudf-cdr.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/wrudf/wrudf-cdr.c b/wrudf/wrudf-cdr.c +index 538167a..27883da 100644 +--- a/wrudf/wrudf-cdr.c ++++ b/wrudf/wrudf-cdr.c +@@ -26,7 +26,7 @@ uint32_t newVATentry() { + sizeVAT += 2048; + vat = realloc(vat, sizeVAT); + if( vat == NULL ) +- printf("VAT reallocation failed\n"); ++ fail("VAT reallocation failed\n"); + } + /* could go through VAT and try to find unused 0xFFFFFFFF entry rather than alloc new one at the end */ + vat[newVATindex] = getNWA() - pd->partitionStartingLocation; diff --git a/SPECS/udftools.spec b/SPECS/udftools.spec index 4890169..90f749e 100644 --- a/SPECS/udftools.spec +++ b/SPECS/udftools.spec @@ -1,7 +1,7 @@ Summary: Linux UDF Filesystem userspace utilities Name: udftools Version: 2.3 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: http://sourceforge.net/projects/linux-udf/ Source: https://github.com/pali/udftools/releases/download/%{version}/udftools-%{version}.tar.gz @@ -43,6 +43,11 @@ rm -rf %{buildroot}%{_bindir}/udffsck %changelog +* Tue Jun 15 2021 Jiri Kucera - 2.3-2 +- wrudf: Fix parsing Volume Descriptor Sequence +- wrudf: Exit on allocation failure + Related: #1882531 + * Fri Jun 11 2021 Jiri Kucera - 2.3-1 - Update to 2.3 Related: #1882531