From 5deef81d7764d523eac62f7a539e9dcb6dddfdbc Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 26 Jul 2000 15:42:58 +0000 Subject: avoid indexing into arrays using signed chars; discovered by fuzz --- gnu/usr.bin/gas/expr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/usr.bin/gas/expr.c b/gnu/usr.bin/gas/expr.c index 5926b528b32..01d501192a5 100644 --- a/gnu/usr.bin/gas/expr.c +++ b/gnu/usr.bin/gas/expr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: expr.c,v 1.6 1998/11/16 00:52:32 jason Exp $ */ +/* $OpenBSD: expr.c,v 1.7 2000/07/26 15:42:57 deraadt Exp $ */ /* expr.c -operands, expressions- Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc. @@ -27,7 +27,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: expr.c,v 1.6 1998/11/16 00:52:32 jason Exp $"; +static char rcsid[] = "$OpenBSD: expr.c,v 1.7 2000/07/26 15:42:57 deraadt Exp $"; #endif #include @@ -739,9 +739,9 @@ segT expr(rank, resultP) { expressionS right; register operatorT op_left; - register char c_left; /* 1st operator character. */ + register u_char c_left; /* 1st operator character. */ register operatorT op_right; - register char c_right; + register u_char c_right; #ifndef __CHAR_UNSIGNED__ know(rank >= 0); -- cgit v1.2.3