fixed segmentation fault

Resolves: #685005
This commit is contained in:
Honza Horák 2012-01-26 14:03:33 +01:00
parent 7887b494e0
commit ec629e8ed8
2 changed files with 28 additions and 1 deletions

View File

@ -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)

View File

@ -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 <hhorak@redhat.com> - 1.0.0b3-14
- fixed segmentation fault
Resolves: #685005
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0b3-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild