--- libarchive-3.2.2/libarchive/archive_write_disk_posix.c.orig 2016-11-01 00:12:25.688260500 -0400 +++ libarchive-3.2.2/libarchive/archive_write_disk_posix.c 2016-11-01 00:17:05.439478200 -0400 @@ -2625,7 +2625,7 @@ * See also : http://msdn.microsoft.com/en-us/library/aa365247.aspx */ static void -cleanup_pathname_win(struct archive_write_disk *a) +cleanup_pathname_win(char *path) { wchar_t wc; char *p; @@ -2636,7 +2636,7 @@ mb = 0; complete = 1; utf8 = (strcmp(nl_langinfo(CODESET), "UTF-8") == 0)? 1: 0; - for (p = a->name; *p != '\0'; p++) { + for (p = path; *p != '\0'; p++) { ++alen; if (*p == '\\') { /* If previous byte is smaller than 128, @@ -2661,7 +2661,7 @@ /* * Convert path separator in wide-character. */ - p = a->name; + p = path; while (*p != '\0' && alen) { l = mbtowc(&wc, p, alen); if (l == (size_t)-1) { @@ -2703,7 +2703,7 @@ } #if defined(__CYGWIN__) - cleanup_pathname_win(a); + cleanup_pathname_win(path); #endif /* Skip leading '/'. */ if (*src == '/') {