aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-coff.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-09-12 02:34:00 +0000
committerIan Lance Taylor <ian@airs.com>1999-09-12 02:34:00 +0000
commite8a3ab752debe9a6a1d15c75950950bc9a1ef024 (patch)
tree4579bb5d016932b43ee7ad748c1921f5e2c08d17 /gas/config/obj-coff.c
parent0561a208f868f3f94e3760e0d68106c1abbd3dc8 (diff)
downloadgdb-e8a3ab752debe9a6a1d15c75950950bc9a1ef024.zip
gdb-e8a3ab752debe9a6a1d15c75950950bc9a1ef024.tar.gz
gdb-e8a3ab752debe9a6a1d15c75950950bc9a1ef024.tar.bz2
1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (add_lineno): Check that the line number is positive.
Diffstat (limited to 'gas/config/obj-coff.c')
-rw-r--r--gas/config/obj-coff.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c
index f52732d..b06710a 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;