From 53f37065d5d871b8dee23d08cc428c30f031893d Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 4 Oct 2015 16:01:08 +0000 Subject: expr can use tame "stdio" ok semarie --- bin/expr/expr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin/expr') diff --git a/bin/expr/expr.c b/bin/expr/expr.c index b5cd6063b9a..7558a0f841b 100644 --- a/bin/expr/expr.c +++ b/bin/expr/expr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: expr.c,v 1.20 2015/08/11 17:15:46 deraadt Exp $ */ +/* $OpenBSD: expr.c,v 1.21 2015/10/04 16:01:07 deraadt Exp $ */ /* $NetBSD: expr.c,v 1.3.6.1 1996/06/04 20:41:47 cgd Exp $ */ /* @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -500,6 +501,9 @@ main(int argc, char *argv[]) (void) setlocale(LC_ALL, ""); + if (tame("stdio", NULL) == -1) + err(1, "tame"); + if (argc > 1 && !strcmp(argv[1], "--")) argv++; -- cgit v1.2.3