diff options
author | Nick Clifton <nickc@redhat.com> | 2004-02-27 12:21:57 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2004-02-27 12:21:57 +0000 |
commit | 4aa3e325e038349730ecd5d41848b98a1cdcdf4b (patch) | |
tree | 247e2e876eaa18846de8706dcf2a2423a2302de1 /gas/config/tc-sh.c | |
parent | af865222e0ac6616ad54999257feb2e7132c5cdb (diff) | |
download | gdb-4aa3e325e038349730ecd5d41848b98a1cdcdf4b.zip gdb-4aa3e325e038349730ecd5d41848b98a1cdcdf4b.tar.gz gdb-4aa3e325e038349730ecd5d41848b98a1cdcdf4b.tar.bz2 |
Fix seg fault on erroneous input
Diffstat (limited to 'gas/config/tc-sh.c')
-rw-r--r-- | gas/config/tc-sh.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c index 3e410e3..b2c3694 100644 --- a/gas/config/tc-sh.c +++ b/gas/config/tc-sh.c @@ -1,6 +1,6 @@ /* tc-sh.c -- Assemble code for the Renesas / SuperH SH - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 - Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, + 2003, 2004 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -1426,6 +1426,8 @@ get_operand (char **ptr, sh_operand_info *op) if (src[0] == '#') { + if (! ISDIGIT (src[1])) + as_bad (_("syntax error in #Imm")); src++; *ptr = parse_exp (src, op); op->type = A_IMM; |