1
0
forked from pool/xfsdump
xfsdump/xfsdump-3.0.1-fix-bufferoverflow.diff
Jan Kara 673086366a Accepting request 74186 from home:michal-m:branches:filesystems
- updated to 3.0.5
  - Release tags will now be digitally signed
  - Quota files will now be dumped, regardless of the maxsize
    setting
  - The new "-s sessid" flag allows inventory sessions to be pruned
    by their session ID.
  - Fixed a bug in handling long dump filenames, and dropped
    (undocumented) support for encoding certain parameters within
    the dump filename
  - NODECHK is now off by default, meaning xfsrestore will now
    support 16 times more directory entries (4 billion)
  - nrh_t is now 64 bits wide, allowing xfsrestore to support dumps
    with up to 4 billion directory entries
  - nix_t is no longer useful, and has been eliminated
  - Memory use in xfsrestore is better managed now.  Segments of
    nodes are now power-of-2 sized, and allocated nodes are no
    longer needlessly zeroed and linked into the free list.
  - Pathname resolution in xfsrestore has a number of performance
    improvements
  - Better checking has been implemented for compatibility when
    resuming a cumulative restore
  - Build system output has been cleaned up considerably
  - Dead "namreg" code has been removed
  - Build dependencies are now determined automatically
  - Other miscellaneous build system improvements, as well bug
    fixes thanks to Mike Frysinger and Arkadiusz Miśkiewicz.
  - Improve xfsinvutil man page and argument processing.
  - Fix timestamp handling on 64-bit architectures in xfsinvutil.
  - Various build system improvements.

OBS-URL: https://build.opensuse.org/request/show/74186
OBS-URL: https://build.opensuse.org/package/show/filesystems/xfsdump?expand=0&rev=7
2011-06-20 13:12:11 +00:00

22 lines
529 B
Diff

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