1
0
forked from pool/xfsdump

Accepting request 33190 from filesystems

Copy from filesystems/xfsdump based on submit request 33190 from user michal-m

OBS-URL: https://build.opensuse.org/request/show/33190
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xfsdump?expand=0&rev=12
This commit is contained in:
OBS User autobuild 2010-02-24 01:33:54 +00:00 committed by Git OBS Bridge
parent a0e224372f
commit 0278c7395e
3 changed files with 31 additions and 3 deletions

View File

@ -0,0 +1,21 @@
Index: xfsdump-3.0.1/common/path.c
===================================================================
--- xfsdump-3.0.1.orig/common/path.c
+++ xfsdump-3.0.1/common/path.c
@@ -283,11 +283,15 @@ pa_gen( pa_t *pap )
sz = 0;
for ( i = 0 ; i < pap->pa_cnt ; i++ ) {
sz += strlen( pap->pa_array[ i ] ) + 1;
}
- sz++;
+ sz++; /* '\0' */
+ /* if pa_cnt == 0, then we need '/' + '\0' */
+ if ( pap->pa_cnt <= 0 ) {
+ sz++;
+ }
retp = ( char * )malloc( sz );
if ( pap->pa_cnt <= 0 ) {
ASSERT( pap->pa_cnt == 0 );

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Feb 22 23:28:43 CET 2010 - seife@opensuse.org
- fix buffer overflow (detected by gcc-4.5)
-------------------------------------------------------------------
Tue Jun 23 12:13:33 CEST 2009 - mmarek@suse.cz

View File

@ -1,7 +1,7 @@
#
# spec file for package xfsdump (Version 3.0.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -21,14 +21,15 @@
Name: xfsdump
BuildRequires: e2fsprogs-devel libattr-devel ncurses-devel xfsprogs-devel
Version: 3.0.1
Release: 1
Release: 2
AutoReqProv: on
Group: System/Filesystems
License: GPL v2 or later
License: GPLv2+
Url: http://oss.sgi.com/projects/xfs/
Summary: Administrative Utilities for the XFS File System
Source0: xfsdump-%version.tar.bz2
Patch0: xfsdump-docdir.diff
Patch1: xfsdump-3.0.1-fix-bufferoverflow.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -57,6 +58,7 @@ Authors:
%prep
%setup -q
%patch0
%patch1 -p1
%build
export CFLAGS=$RPM_OPT_FLAGS