misc/183093: mtree generation issue with libarchive

Anthony Donnelly Amzo at archbsd.net
Sat Oct 19 02:20:01 UTC 2013


>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 at 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:


More information about the freebsd-bugs mailing list