summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1997-02-15 14:17:28 +0000
committerjkh <jkh@FreeBSD.org>1997-02-15 14:17:28 +0000
commit3bb96193748acd86854b70e7d2f451bab7de2d00 (patch)
tree339cf84302bfdee84180aca895591b8d176c10d8 /usr.sbin/pkg_install
parent7f556ff4628772f6a51d9c0d6d086a388f11ffdb (diff)
downloadFreeBSD-src-3bb96193748acd86854b70e7d2f451bab7de2d00.zip
FreeBSD-src-3bb96193748acd86854b70e7d2f451bab7de2d00.tar.gz
Fix a bogon with playpen size calculation for pkg of "-". It's amazing
this ever worked, actually.
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/add/perform.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/add/perform.c b/usr.sbin/pkg_install/add/perform.c
index 139c3e2..1a1ebbe 100644
--- a/usr.sbin/pkg_install/add/perform.c
+++ b/usr.sbin/pkg_install/add/perform.c
@@ -114,8 +114,10 @@ pkg_do(char *pkg)
sprintf(extract_contents, "--fast-read %s", CONTENTS_FNAME);
extract = extract_contents;
}
- else
+ else {
extract = NULL;
+ sb.st_size = 100000; /* Make up a plausible average size */
+ }
Home = make_playpen(playpen, sb.st_size * 4);
if (!Home)
whinge("Unable to make playpen for %d bytes.\n", sb.st_size * 4);
OpenPOWER on IntegriCloud