diff --git a/gas/ChangeLog b/gas/ChangeLog index f216b8498c..f354c229ed 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2015-02-05 Alan Modra + + * config/tc-msp430.c (md_assemble): Correct size passed to + extract_cmd. Remove index check. + 2015-02-04 Matthew Wahab * config/tc-aarch64.c (aarch64_cpus): Add support for Cortex-A72. diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c index e44e7b2602..2891c13277 100644 --- a/gas/config/tc-msp430.c +++ b/gas/config/tc-msp430.c @@ -3174,9 +3174,9 @@ md_assemble (char * str) unsigned int i = 0; str = skip_space (str); /* Skip leading spaces. */ - str = extract_cmd (str, cmd, sizeof (cmd)); + str = extract_cmd (str, cmd, sizeof (cmd) - 1); - while (cmd[i] && i < sizeof (cmd)) + while (cmd[i]) { char a = TOLOWER (cmd[i]); cmd[i] = a;