From e8a3ab752debe9a6a1d15c75950950bc9a1ef024 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sun, 12 Sep 1999 02:34:00 +0000 Subject: [PATCH] 1999-09-11 Donn Terry * config/obj-coff.c (add_lineno): Check that the line number is positive. --- gas/ChangeLog | 3 +++ gas/config/obj-coff.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index a04238003de..3650223a161 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -5,6 +5,9 @@ 1999-09-11 Donn Terry + * config/obj-coff.c (add_lineno): Check that the line number is + positive. + * config/atof-ieee.c (atof_ieee): Change what_kind to int. * config/atof-vax.c (flonum_gen2vax): Change format_letter to int. diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c index f52732dea6c..b06710a533c 100644 --- a/gas/config/obj-coff.c +++ b/gas/config/obj-coff.c @@ -434,6 +434,12 @@ add_lineno (frag, offset, num) { abort (); } + if (num <= 0) + { + /* Zero is used as an end marker in the file. */ + as_bad (_("Line numbers must be positive integers\n")); + return; + } new_line->next = line_nos; new_line->frag = frag; new_line->l.line_number = num; -- 2.30.2