projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86ed34a
)
* listing.c (buffer_line): Don't write past the end of `line' when
author
Alan Modra
<amodra@gmail.com>
Tue, 25 Sep 2001 12:09:45 +0000
(12:09 +0000)
committer
Alan Modra
<amodra@gmail.com>
Tue, 25 Sep 2001 12:09:45 +0000
(12:09 +0000)
EOF is reached.
gas/ChangeLog
patch
|
blob
|
history
gas/listing.c
patch
|
blob
|
history
diff --git
a/gas/ChangeLog
b/gas/ChangeLog
index eb9f1f8bedba11ea9a0650fad2ef4d12c438e58a..3d3000d1219bf5be01d6c221e9fe783cc3ef8a84 100644
(file)
--- a/
gas/ChangeLog
+++ b/
gas/ChangeLog
@@
-1,3
+1,8
@@
+2001-09-25 Geoff Berry <geoff.berry@bops.com>
+
+ * listing.c (buffer_line): Don't write past the end of `line' when
+ EOF is reached.
+
2001-09-25 Alexandre Oliva <aoliva@redhat.com>
* config/tc-mn10300.c (tc_gen_reloc): Don't emit an *ABS*
diff --git
a/gas/listing.c
b/gas/listing.c
index f8847d9a2071f286081dfba75a1a790d649af884..c92f2db11c33682ee5f1edce45f85072e62a6ec4 100644
(file)
--- a/
gas/listing.c
+++ b/
gas/listing.c
@@
-513,9
+513,12
@@
buffer_line (file, line, size)
if (c == EOF)
{
file->at_end = 1;
- *p++ = '.';
- *p++ = '.';
- *p++ = '.';
+ if (count + 2 < size)
+ {
+ *p++ = '.';
+ *p++ = '.';
+ *p++ = '.';
+ }
}
file->linenum++;
*p++ = 0;