Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Oct 2013 02:15:41 GMT
From:      Anthony Donnelly <Amzo@archbsd.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/183093: mtree generation issue with libarchive
Message-ID:  <201310190215.r9J2Ffan050921@oldred.freebsd.org>
Resent-Message-ID: <201310190220.r9J2K0EY013673@freefall.freebsd.org>

index | next in thread | raw e-mail


>Number:         183093
>Category:       misc
>Synopsis:       mtree generation issue with libarchive
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 19 02:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Anthony Donnelly
>Release:        FreeBSD 10-stable
>Organization:
>Environment:
FreeBSD Bahamut 10.0-ALPHA6 FreeBSD 10.0-ALPHA6 #0 59c3f5e(stable/10)-dirty: Fri Oct 11 04:37:22 BST 2013     root@Bahamut:/usr/home/amzo/abs/core/FreeBSD/src/obj/amd64.amd64/usr/home/amzo/abs/core/FreeBSD/src/freebsd/sys/ARCHBSD_x86_64  x86_64

>Description:
libarchive that is currently part of base, reports ENOMEM on mtree generation.

The issue is also present here: 

http://code.google.com/p/libarchive/issues/detail?id=301

Which was reported fixed in 3.1.1 but the issue is still present in libarchive in world in 10-stable.
>How-To-Repeat:
Follow the Steps here: http://code.google.com/p/libarchive/issues/detail?id=301#c4
>Fix:
--- contrib/libarchive/libarchive/archive_write_set_format_mtree.c	2013-10-18 15:55:49.918078350 +0100
+++ contrib/libarchive/libarchive/archive_write_set_format_mtree.c.new	2013-10-18 15:57:24.640074710 +0100
@@ -1857,7 +1857,7 @@
 
 	/* Make a basename from dirname and slash */
 	*slash  = '\0';
-	file->parentdir.length = slash - dirname;
+	file->parentdir.length = slash - file->parentdir.s;
 	archive_strcpy(&(file->basename),  slash + 1);
 	return (ret);
 }

>Release-Note:
>Audit-Trail:
>Unformatted:


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310190215.r9J2Ffan050921>