archivers/gtar: fix memory corruption when parsing TAR_OPTIONS

This commit is contained in:
naddy 2021-01-17 19:11:49 +00:00
parent 4cbd660002
commit 9c375a115c
2 changed files with 19 additions and 1 deletions

View File

@ -1,9 +1,10 @@
# $OpenBSD: Makefile,v 1.86 2021/01/16 18:52:19 naddy Exp $
# $OpenBSD: Makefile,v 1.87 2021/01/17 19:11:49 naddy Exp $
COMMENT= GNU version of the traditional tape archiver
DISTNAME= tar-1.33
PKGNAME= g${DISTNAME}
REVISION= 0
CATEGORIES= archivers
HOMEPAGE= https://www.gnu.org/software/tar/

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-src_tar_c,v 1.3 2021/01/17 19:11:50 naddy Exp $
Fix improper argument reference.
https://git.savannah.gnu.org/cgit/tar.git/commit/?id=2251317e3fe971fd34608cf312c8120141d8fce4
Index: src/tar.c
--- src/tar.c.orig
+++ src/tar.c
@@ -2248,7 +2248,7 @@ parse_default_options (struct tar_args *args)
if (argp_parse (&argp,
ws.ws_offs + ws.ws_wordc,
ws.ws_wordv,
- ARGP_IN_ORDER|ARGP_NO_EXIT, &idx, &args))
+ ARGP_IN_ORDER|ARGP_NO_EXIT, &idx, args))
abort (); /* shouldn't happen */
args->loc = save_loc_ptr;
if (name_more_files ())