=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sed/compile.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- src/usr.bin/sed/compile.c 2004/02/17 16:13:33 1.17 +++ src/usr.bin/sed/compile.c 2004/06/13 17:11:17 1.18 @@ -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 @@ -596,7 +596,7 @@ 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++)