aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@arm.com>2018-03-02 10:46:32 +0000
committerThomas Preud'homme <thomas.preudhomme@arm.com>2018-03-02 10:47:14 +0000
commite7da50fa4b4f770240feda51ba60f6255073e54f (patch)
tree8ce12ce57bc934fe2cd73d685502194c5b516518 /gas
parented2592386c36bfc0b82049ce88758303b16ca075 (diff)
downloadfsf-binutils-gdb-e7da50fa4b4f770240feda51ba60f6255073e54f.zip
fsf-binutils-gdb-e7da50fa4b4f770240feda51ba60f6255073e54f.tar.gz
fsf-binutils-gdb-e7da50fa4b4f770240feda51ba60f6255073e54f.tar.bz2
[ARM] Fix NULL dereference of march_ext_opt
Commit 4d354d8b8932d450c77fd52f3501662827523014 introduced a NULL pointer dereference by replacing a pointer assignment by a pointer dereference assignment without adding a NULL pointer check. This patch fixes it. 2018-03-02 Thomas Preud'homme <thomas.preudhomme@arm.com> gas/ * config/tc-arm.c (md_begin): Add NULL pointer check before dereferencing march_ext_opt.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-arm.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 46711fd..d8f5892 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2018-03-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * config/tc-arm.c (md_begin): Add NULL pointer check before
+ dereferencing march_ext_opt.
+
2018-03-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
* config/tc-arm.c (cpu_variant, arm_arch_used, thumb_arch_used,
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index ac403cc..eda9890 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -25407,7 +25407,7 @@ md_begin (void)
from the processor. */
if (mcpu_fpu_opt)
selected_fpu = *mcpu_fpu_opt;
- else
+ else if (march_fpu_opt)
selected_fpu = *march_fpu_opt;
#else
selected_fpu = fpu_default;