gnu: libmtp: Update to 1.1.11.
[jackhill/guix/guix.git] / gnu / packages / patches / libarchive-mtree-filename-length-fix.patch
1 Description: Patch to fix filename length calculation when writing mtree archives.
2 Author: Dave Reisner <dreisner@archlinux.org>
3 Origin: upstream
4
5 --- a/libarchive/archive_write_set_format_mtree.c
6 +++ b/libarchive/archive_write_set_format_mtree.c
7 @@ -1855,9 +1855,9 @@
8 return (ret);
9 }
10
11 - /* Make a basename from dirname and slash */
12 + /* Make a basename from file->parentdir.s and slash */
13 *slash = '\0';
14 - file->parentdir.length = slash - dirname;
15 + file->parentdir.length = slash - file->parentdir.s;
16 archive_strcpy(&(file->basename), slash + 1);
17 return (ret);
18 }