summaryrefslogtreecommitdiffhomepage
path: root/patches/libarchive
diff options
context:
space:
mode:
authorØrjan Malde <red@foxi.me>2024-03-31 21:03:29 +0200
committerØrjan Malde <red@foxi.me>2024-03-31 21:03:29 +0200
commitd15ec42e67cb20e6c673b68084ce6310a63617bf (patch)
tree265aeaa426770a229a757af9cfaf64fb935a4cfb /patches/libarchive
parent3202ebb5584e70af6b468346f6d844f6b5fcf968 (diff)
downloadmidipix_build-d15ec42e67cb20e6c673b68084ce6310a63617bf.tar.bz2
midipix_build-d15ec42e67cb20e6c673b68084ce6310a63617bf.tar.xz
patches/libarchive/fix-shell-escape.patch: backport upstream fix
Signed-off-by: Ørjan Malde <red@foxi.me>
Diffstat (limited to 'patches/libarchive')
-rw-r--r--patches/libarchive/fix-shell-escape.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/libarchive/fix-shell-escape.patch b/patches/libarchive/fix-shell-escape.patch
new file mode 100644
index 00000000..6a351ba3
--- /dev/null
+++ b/patches/libarchive/fix-shell-escape.patch
@@ -0,0 +1,27 @@
+From 6110e9c82d8ba830c3440f36b990483ceaaea52c Mon Sep 17 00:00:00 2001
+From: Ed Maste <emaste@freebsd.org>
+Date: Fri, 29 Mar 2024 18:02:06 -0400
+Subject: [PATCH] tar: make error reporting more robust and use correct errno
+ (#2101)
+
+As discussed in #1609.
+---
+ tar/read.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tar/read.c b/tar/read.c
+index af3d3f423..a7f14a07b 100644
+--- a/tar/read.c
++++ b/tar/read.c
+@@ -371,8 +371,9 @@ read_archive(struct bsdtar *bsdtar, char mode, struct archive *writer)
+ if (r != ARCHIVE_OK) {
+ if (!bsdtar->verbose)
+ safe_fprintf(stderr, "%s", archive_entry_pathname(entry));
+- fprintf(stderr, ": %s: ", archive_error_string(a));
+- fprintf(stderr, "%s", strerror(errno));
++ safe_fprintf(stderr, ": %s: %s",
++ archive_error_string(a),
++ strerror(archive_errno(a)));
+ if (!bsdtar->verbose)
+ fprintf(stderr, "\n");
+ bsdtar->return_value = 1;