From Petr Ledvina <ledvinap@kae.zcu.cz>:

* signals.c (target_signal_to_name): Verify that SIG is within the
bounds of the signals array.
This commit is contained in:
Andrew Cagney 2002-01-13 21:11:38 +00:00
parent 4daa9f9f37
commit 89c49e7acb
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2002-01-13 Andrew Cagney <ac131313@redhat.com>
From Petr Ledvina <ledvinap@kae.zcu.cz>:
* signals.c (target_signal_to_name): Verify that SIG is within the
bounds of the signals array.
2002-01-13 Andrew Cagney <ac131313@redhat.com>
* MAINTAINERS: Remove arm-coff and arm-pe from target list.

View File

@ -214,7 +214,10 @@ target_signal_to_name (enum target_signal sig)
/* I think the code which prints this will always print it along with
the string, so no need to be verbose. */
return "?";
return signals[sig].name;
else if ((sig >= TARGET_SIGNAL_FIRST) && (sig <= TARGET_SIGNAL_LAST))
return signals[sig].name;
else
return signals[sig].name;
}
/* Given a name, return its signal. */