aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-01-04 08:53:37 +1030
committerAlan Modra <amodra@gmail.com>2021-01-04 11:08:05 +1030
commit90320e40958020aea265dc693d0613a330e40b61 (patch)
tree8225aa019c4a8bbd3968fd15cf216859d1ffd234 /gas
parenta68494db8456671321e1607b6118c0032eec4ca6 (diff)
downloadgdb-90320e40958020aea265dc693d0613a330e40b61.zip
gdb-90320e40958020aea265dc693d0613a330e40b61.tar.gz
gdb-90320e40958020aea265dc693d0613a330e40b61.tar.bz2
PR27101, as: Reject (byte) .align 0x100000000
This allows alignments up to 2**TC_ALIGN_LIMIT, which might be larger than an unsigned int can hold. PR 27101 * read.c (s_align): Use a large enough type for "align" to hold the result of get_absolute_expression.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/read.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 155ec7e..b38c379 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-04 Alan Modra <amodra@gmail.com>
+
+ PR 27101
+ * read.c (s_align): Use a large enough type for "align" to hold
+ the result of get_absolute_expression.
+
2021-01-01 Nicolas Boulenguez <nicolas@debian.org>
* config/tc-i386.c: Correct comment spelling.
diff --git a/gas/read.c b/gas/read.c
index cf704b3..9d0ba27 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -1548,7 +1548,7 @@ static void
s_align (signed int arg, int bytes_p)
{
unsigned int align_limit = TC_ALIGN_LIMIT;
- unsigned int align;
+ addressT align;
char *stop = NULL;
char stopc = 0;
offsetT fill = 0;
@@ -1595,7 +1595,7 @@ s_align (signed int arg, int bytes_p)
if (align > align_limit)
{
align = align_limit;
- as_warn (_("alignment too large: %u assumed"), align);
+ as_warn (_("alignment too large: %u assumed"), align_limit);
}
if (*input_line_pointer != ',')