diff options
author | 2001-04-13 20:35:19 +0000 | |
---|---|---|
committer | 2001-04-13 20:35:19 +0000 | |
commit | 7bdcf72f147d802a9c6851b4d9afe2690bd5c5bf (patch) | |
tree | 4a92bce29d76037f68aa7ffb1559ca51402e50b7 | |
parent | signess bug; jwaterman@yaleroad.com (diff) | |
download | wireguard-openbsd-7bdcf72f147d802a9c6851b4d9afe2690bd5c5bf.tar.xz wireguard-openbsd-7bdcf72f147d802a9c6851b4d9afe2690bd5c5bf.zip |
Another case where we need to use u_char, not char for array
subscripts to avoid buf[-1] problems.
Also add a missing include of unistd.h. OK'd by Theo
-rw-r--r-- | lib/libedit/el.c | 5 | ||||
-rw-r--r-- | lib/libedit/map.c | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/libedit/el.c b/lib/libedit/el.c index 6a447f28a8b..c786df21ff1 100644 --- a/lib/libedit/el.c +++ b/lib/libedit/el.c @@ -1,4 +1,4 @@ -/* $OpenBSD: el.c,v 1.7 2000/06/28 17:45:25 dugsong Exp $ */ +/* $OpenBSD: el.c,v 1.8 2001/04/13 20:35:19 millert Exp $ */ /* $NetBSD: el.c,v 1.6 1997/04/24 18:54:16 christos Exp $ */ /*- @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)el.c 8.2 (Berkeley) 1/3/94"; #else -static char rcsid[] = "$OpenBSD: el.c,v 1.7 2000/06/28 17:45:25 dugsong Exp $"; +static char rcsid[] = "$OpenBSD: el.c,v 1.8 2001/04/13 20:35:19 millert Exp $"; #endif #endif /* not lint && not SCCSID */ @@ -59,6 +59,7 @@ static char rcsid[] = "$OpenBSD: el.c,v 1.7 2000/06/28 17:45:25 dugsong Exp $"; #else # include <varargs.h> #endif +#include <unistd.h> #include "el.h" /* el_init(): diff --git a/lib/libedit/map.c b/lib/libedit/map.c index 44e68607d5a..00283efa6cc 100644 --- a/lib/libedit/map.c +++ b/lib/libedit/map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: map.c,v 1.4 1998/08/16 20:24:53 millert Exp $ */ +/* $OpenBSD: map.c,v 1.5 2001/04/13 20:35:19 millert Exp $ */ /* $NetBSD: map.c,v 1.3 1997/01/11 06:48:00 lukem Exp $ */ /*- @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/4/93"; #else -static char rcsid[] = "$OpenBSD: map.c,v 1.4 1998/08/16 20:24:53 millert Exp $"; +static char rcsid[] = "$OpenBSD: map.c,v 1.5 2001/04/13 20:35:19 millert Exp $"; #endif #endif /* not lint && not SCCSID */ @@ -968,7 +968,7 @@ private void map_init_meta(el) EditLine *el; { - char buf[3]; + unsigned char buf[3]; register int i; el_action_t *map = el->el_map.key; el_action_t *alt = el->el_map.alt; @@ -987,7 +987,7 @@ map_init_meta(el) else map = alt; } - buf[0] = (char) i; + buf[0] = (unsigned char) i; buf[2] = 0; for (i = 0200; i <= 0377; i++) switch (map[i]) { |