diff options
-rw-r--r-- | usr.bin/sed/compile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c index 4dacec407c3..7e334585906 100644 --- a/usr.bin/sed/compile.c +++ b/usr.bin/sed/compile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compile.c,v 1.17 2004/02/17 16:13:33 otto Exp $ */ +/* $OpenBSD: compile.c,v 1.18 2004/06/13 17:11:17 deraadt Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -35,7 +35,7 @@ #ifndef lint /* from: static char sccsid[] = "@(#)compile.c 8.2 (Berkeley) 4/28/95"; */ -static char *rcsid = "$OpenBSD: compile.c,v 1.17 2004/02/17 16:13:33 otto Exp $"; +static char *rcsid = "$OpenBSD: compile.c,v 1.18 2004/06/13 17:11:17 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -596,7 +596,7 @@ compile_tr(char *p, char **transtab) return (NULL); } /* We assume characters are 8 bits */ - lt = xmalloc(UCHAR_MAX); + lt = xmalloc(UCHAR_MAX + 1); for (i = 0; i <= UCHAR_MAX; i++) lt[i] = (char)i; for (op = old, np = new; *op; op++, np++) |