From: Tim Kientzle Date: Sat, 3 Jul 2010 02:32:12 +0000 (-0400) Subject: Fix a counting error in the Mac pathname editing. X-Git-Tag: v3.0.0a~922 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d39982fb32edc5568a4ee48ff1b21de04febd637;p=thirdparty%2Flibarchive.git Fix a counting error in the Mac pathname editing. Using memmove() here is efficient, but a bit touchy. This fixes bsdtar_test_copy, which was broken in r2522. SVN-Revision: 2523 --- diff --git a/libarchive/archive_write_set_format_pax.c b/libarchive/archive_write_set_format_pax.c index 57c89fd0a..c43b4c685 100644 --- a/libarchive/archive_write_set_format_pax.c +++ b/libarchive/archive_write_set_format_pax.c @@ -539,7 +539,7 @@ archive_write_pax_header(struct archive_write *a, memmove(name, "._", 2); } else { bname += 1; - memmove(bname + 2, bname, strlen(bname)); + memmove(bname + 2, bname, strlen(bname) + 1); memmove(bname, "._", 2); } archive_entry_copy_pathname(extra, name);