summaryrefslogtreecommitdiff
path: root/usr.bin/oldrdist/gram.y
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-08-22 20:33:25 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-08-22 20:33:25 +0000
commit92c01dd3234ebed386e6bec16b670a3af88bdb13 (patch)
treecf117c1dbdcf46642534ac9c526777a3e3c414a7 /usr.bin/oldrdist/gram.y
parent83401538373dbe9ae9dc907fffe379a27ceed105 (diff)
NetBSD changes: use POSIX regex routines and fix more buff oflow
Can't use mkstemp() so go back to mktemp and open(2) with sane flags. Now uses rcmdsh and fixes memory leak in NetBSD POSIX regex support (leak fixed by Charles Amos <amos@umiacs.umd.edu>).
Diffstat (limited to 'usr.bin/oldrdist/gram.y')
-rw-r--r--usr.bin/oldrdist/gram.y11
1 files changed, 3 insertions, 8 deletions
diff --git a/usr.bin/oldrdist/gram.y b/usr.bin/oldrdist/gram.y
index 8639687a95c..4353c98ab09 100644
--- a/usr.bin/oldrdist/gram.y
+++ b/usr.bin/oldrdist/gram.y
@@ -34,7 +34,7 @@
#ifndef lint
/* from: static char sccsid[] = "@(#)gram.y 8.1 (Berkeley) 6/9/93"; */
-static char *rcsid = "$Id: gram.y,v 1.1 1996/02/03 12:11:57 dm Exp $";
+static char *rcsid = "$Id: gram.y,v 1.2 1996/08/22 20:33:20 millert Exp $";
#endif /* not lint */
#include "defs.h"
@@ -163,13 +163,8 @@ cmd: INSTALL options opt_namelist SM = {
$$ = $1;
}
| PATTERN namelist SM = {
- struct namelist *nl;
- char *cp, *re_comp();
-
- for (nl = $2; nl != NULL; nl = nl->n_next)
- if ((cp = re_comp(nl->n_name)) != NULL)
- yyerror(cp);
- $1->sc_args = expand($2, E_VARS);
+ if ($2 != NULL)
+ $1->sc_args = expand($2, E_VARS);
$$ = $1;
}
| SPECIAL opt_namelist STRING SM = {