summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-01-11 12:20:46 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-01-11 12:20:46 +0000
commit1434f09b880c04e4088fabce369a7a6c99939292 (patch)
tree109a9b019a8602ae8b3d40c20cb26626a5167665 /usr.sbin/pkg_add
parentf8c26486ac87864256c9a669ec1136bbad48d0cb (diff)
protect gzip against weird file names
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r--usr.sbin/pkg_add/pkg_mklocatedb4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/pkg_mklocatedb b/usr.sbin/pkg_add/pkg_mklocatedb
index 511b5464c41..237c4cda531 100644
--- a/usr.sbin/pkg_add/pkg_mklocatedb
+++ b/usr.sbin/pkg_add/pkg_mklocatedb
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# Copyright (c) 2005-2010 Marc Espie <espie@openbsd.org>
-# $OpenBSD: pkg_mklocatedb,v 1.22 2010/01/01 16:09:35 espie Exp $
+# $OpenBSD: pkg_mklocatedb,v 1.23 2010/01/11 12:20:45 espie Exp $
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -127,7 +127,7 @@ if ($opt_r) {
while (my $e = readdir $dir) {
if ($e =~ m/^(\w+\d\d)\.tgz$/o) {
my $set = $1;
- open my $arc, '-|', OpenBSD::Paths->gzip, '-c', '-d', "$opt_r/$e";
+ open my $arc, '-|', OpenBSD::Paths->gzip, '-c', '-d', "--", "$opt_r/$e";
my $u = OpenBSD::Ustar->new($arc, '/');
while (my $f = $u->next) {
my $name = $f->{name};