import udftools-2.3-2.el8

This commit is contained in:
CentOS Sources 2021-06-16 04:23:27 +00:00 committed by Stepan Oksanichenko
parent a0f87bfce8
commit fe61eeff5c
2 changed files with 75 additions and 1 deletions

View File

@ -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?= <pali.rohar@gmail.com>
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 <jkucera@redhat.com>
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;

View File

@ -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 <jkucera@redhat.com> - 2.3-2
- wrudf: Fix parsing Volume Descriptor Sequence
- wrudf: Exit on allocation failure
Related: #1882531
* Fri Jun 11 2021 Jiri Kucera <jkucera@redhat.com> - 2.3-1
- Update to 2.3
Related: #1882531