diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-06-04 23:05:37 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-06-04 23:05:37 +0000 |
commit | d8d373a1f24624aa8098e182d49cd8b4af9eea72 (patch) | |
tree | b02fef3e828d60ed03d0329488982b04c5cfc070 /cpukit/score/src/objectidtoname.c | |
parent | 2008-06-04 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-d8d373a1f24624aa8098e182d49cd8b4af9eea72.tar.bz2 |
2008-06-04 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/src/objectgetinfo.c, score/src/objectidtoname.c,
score/src/threadget.c: Make sure the pointer to the API object table
is valid before derefencing it.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/src/objectidtoname.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/score/src/objectidtoname.c b/cpukit/score/src/objectidtoname.c index 52a4813815..de34dc5fa1 100644 --- a/cpukit/score/src/objectidtoname.c +++ b/cpukit/score/src/objectidtoname.c @@ -54,7 +54,10 @@ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; the_api = _Objects_Get_API( tmpId ); - if ( the_api && the_api > OBJECTS_APIS_LAST ) + if ( !_Objects_Is_api_valid( the_api ) ) + return OBJECTS_INVALID_ID; + + if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); |