From ec629e8ed85dc8d66b2d127d7dd12a5dc7f08c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Hor=C3=A1k?= Date: Thu, 26 Jan 2012 14:03:33 +0100 Subject: [PATCH] fixed segmentation fault Resolves: #685005 --- udftools-1.0.0b3-extsize.patch | 21 +++++++++++++++++++++ udftools.spec | 8 +++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 udftools-1.0.0b3-extsize.patch diff --git a/udftools-1.0.0b3-extsize.patch b/udftools-1.0.0b3-extsize.patch new file mode 100644 index 0000000..6316f66 --- /dev/null +++ b/udftools-1.0.0b3-extsize.patch @@ -0,0 +1,21 @@ +diff -up udftools-1.0.0b3/libudffs/extent.c.extsize udftools-1.0.0b3/libudffs/extent.c +--- udftools-1.0.0b3/libudffs/extent.c.extsize 2012-01-26 09:45:22.217856499 +0100 ++++ udftools-1.0.0b3/libudffs/extent.c 2012-01-26 09:45:43.142855067 +0100 +@@ -50,7 +50,7 @@ cont: + while (start_ext != NULL && start_ext->blocks < blocks) + start_ext = next_extent(start_ext->next, type); + +- if (start_ext->start % offset) ++ if (start_ext != NULL && start_ext->start % offset) + { + inc = offset - (start_ext->start % offset); + if (start_ext->blocks - inc < blocks) +@@ -62,7 +62,7 @@ cont: + else + inc = 0; + +- return start_ext->start + inc; ++ return start_ext ? start_ext->start + inc : NULL; + } + + struct udf_extent *prev_extent(struct udf_extent *start_ext, enum udf_space_type type) diff --git a/udftools.spec b/udftools.spec index 63182bb..5edad91 100644 --- a/udftools.spec +++ b/udftools.spec @@ -1,7 +1,7 @@ Summary: Linux UDF Filesystem userspace utilities Name: udftools Version: 1.0.0b3 -Release: 13%{?dist} +Release: 14%{?dist} License: GPLv2+ Group: Applications/Archiving URL: http://sourceforge.net/projects/linux-udf/ @@ -12,6 +12,7 @@ Patch2: udftools-1.0.0b3-wrudf-gcc4.patch Patch3: udftools-1.0.0b3-warningfixes.patch Patch4: udftools-1.0.0b3-fixcompile.patch Patch5: udftools-1.0.0b3-warningfixes2.patch +Patch6: udftools-1.0.0b3-extsize.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: readline-devel, ncurses-devel @@ -27,6 +28,7 @@ Linux UDF Filesystem userspace utilities. %patch3 -p1 -b .warningfixes %patch4 -p1 -b .fixcompile %patch5 -p1 -b .warningfixes2 +%patch6 -p1 -b .extsize %build @@ -54,6 +56,10 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %changelog +* Thu Jan 26 2012 Honza Horak - 1.0.0b3-14 +- fixed segmentation fault + Resolves: #685005 + * Mon Feb 07 2011 Fedora Release Engineering - 1.0.0b3-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild