mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-13 04:13:33 +08:00
PR gas/11733
* config/tc-sh.c (find_cooked_opcode): Correct array bounds check.
This commit is contained in:
parent
89e38f6b1a
commit
6d0cb78c78
@ -1,3 +1,8 @@
|
||||
2010-06-21 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR gas/11733
|
||||
* config/tc-sh.c (find_cooked_opcode): Correct array bounds check.
|
||||
|
||||
2010-06-18 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* config/tc-tic6x.h (tic6x_segment_info_type): Add field
|
||||
|
@ -2545,7 +2545,7 @@ find_cooked_opcode (char **str_p)
|
||||
unsigned char *op_start;
|
||||
unsigned char *op_end;
|
||||
char name[20];
|
||||
int nlen = 0;
|
||||
unsigned int nlen = 0;
|
||||
|
||||
/* Drop leading whitespace. */
|
||||
while (*str == ' ')
|
||||
@ -2557,7 +2557,7 @@ find_cooked_opcode (char **str_p)
|
||||
assemble_ppi, so the opcode might be terminated by an '@'. */
|
||||
for (op_start = op_end = (unsigned char *) str;
|
||||
*op_end
|
||||
&& nlen < 20
|
||||
&& nlen < sizeof (name) - 1
|
||||
&& !is_end_of_line[*op_end] && *op_end != ' ' && *op_end != '@';
|
||||
op_end++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user