summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2004-06-13 17:11:17 +0000
committerderaadt <deraadt@openbsd.org>2004-06-13 17:11:17 +0000
commit34fab0c53412bc5d762b4df717b11d2e25071d46 (patch)
treef365c7748feaacaae75ccb9857ed4e414f3286ab
parentremove duplicate setting of $SCP; spotted by markus@ (diff)
downloadwireguard-openbsd-34fab0c53412bc5d762b4df717b11d2e25071d46.tar.xz
wireguard-openbsd-34fab0c53412bc5d762b4df717b11d2e25071d46.zip
1-byte overflow; ryo@nerv.org, otto ok
-rw-r--r--usr.bin/sed/compile.c6
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++)