diff options
author | 2004-08-05 19:12:32 +0000 | |
---|---|---|
committer | 2004-08-05 19:12:32 +0000 | |
commit | 3228e8830f19241bda6458fd75c40c9d7841724d (patch) | |
tree | 3cf0538bcb6af6d0d3a74a6a9aba7d27b2902a18 | |
parent | Cleanup aspath specific functions and api. Mainly switch to a refcnt based (diff) | |
download | wireguard-openbsd-3228e8830f19241bda6458fd75c40c9d7841724d.tar.xz wireguard-openbsd-3228e8830f19241bda6458fd75c40c9d7841724d.zip |
Watch your step and do not access memory below what you've just allocated;
fixes SIGV on m68k.
ok tdeval@ millert@
-rw-r--r-- | gnu/usr.bin/gas/read.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gnu/usr.bin/gas/read.c b/gnu/usr.bin/gas/read.c index a2559dc394d..c457288d885 100644 --- a/gnu/usr.bin/gas/read.c +++ b/gnu/usr.bin/gas/read.c @@ -1,4 +1,4 @@ -/* $OpenBSD: read.c,v 1.10 2001/09/14 19:49:03 espie Exp $ */ +/* $OpenBSD: read.c,v 1.11 2004/08/05 19:12:32 miod Exp $ */ /* read.c - read a source file - @@ -21,7 +21,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef lint -static char rcsid[] = "$OpenBSD: read.c,v 1.10 2001/09/14 19:49:03 espie Exp $"; +static char rcsid[] = "$OpenBSD: read.c,v 1.11 2004/08/05 19:12:32 miod Exp $"; #endif #define MASK_CHAR (0xFF) /* If your chars aren't 8 bits, you will @@ -376,7 +376,8 @@ char *name; * If input_line_pointer[-1] == '\n' then we just * scanned another line: so bump line counters. */ - if (input_line_pointer[-1] == '\n') { + if (input_line_pointer > buffer && + input_line_pointer[-1] == '\n') { bump_line_counters(); } /* just passed a newline */ |