]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix a counting error in the Mac pathname editing.
authorTim Kientzle <kientzle@gmail.com>
Sat, 3 Jul 2010 02:32:12 +0000 (22:32 -0400)
committerTim Kientzle <kientzle@gmail.com>
Sat, 3 Jul 2010 02:32:12 +0000 (22:32 -0400)
Using memmove() here is efficient, but a bit touchy.
This fixes bsdtar_test_copy, which was broken in r2522.

SVN-Revision: 2523

libarchive/archive_write_set_format_pax.c

index 57c89fd0a52ce141d7cac648e86322ee42022daa..c43b4c6853fc65effb4cba05ea9fd9256d1925fc 100644 (file)
@@ -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);