summaryrefslogtreecommitdiff
path: root/output
diff options
context:
space:
mode:
authorChang S. Bae <changseok.bae@gmail.com>2019-04-26 23:15:36 -0700
committerCyrill Gorcunov <gorcunov@gmail.com>2019-06-02 23:51:35 +0300
commit0995aa24aa7999a98f54c66ad989b47ce9a41e78 (patch)
tree17bd9ba39a8e38dcf9a52ea0353e7853e88a31af /output
parent55f3dd579257af5f002d53d76bbd7d99e9d81b03 (diff)
downloadnasm-0995aa24aa7999a98f54c66ad989b47ce9a41e78.tar.gz
outbin: Fix infinite dashes written to map file
Unfortunately, there is an assumption that the section name is bounded to '65' characters and dashes have been appended so far. A simple fix for this report: https://bugzilla.nasm.us/show_bug.cgi?id=3392564 We may need to cleanup further for those hardcoded numbers in decorating the section info. Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Diffstat (limited to 'output')
-rw-r--r--output/outbin.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/output/outbin.c b/output/outbin.c
index 9983cd33..95885b26 100644
--- a/output/outbin.c
+++ b/output/outbin.c
@@ -606,6 +606,7 @@ static void bin_cleanup(void)
fprintf(rf, "\n\n");
list_for_each(s, sections) {
fprintf(rf, "---- Section %s ", s->name);
+ if (strlen(s->name) < 65)
for (h = 65 - strlen(s->name); h; h--)
fputc('-', rf);
fprintf(rf, "\n\nclass: ");