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/threadget.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 'cpukit/score/src/threadget.c')
-rw-r--r-- | cpukit/score/src/threadget.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cpukit/score/src/threadget.c b/cpukit/score/src/threadget.c index 126a6cc69f..d7d9106998 100644 --- a/cpukit/score/src/threadget.c +++ b/cpukit/score/src/threadget.c @@ -53,6 +53,7 @@ Thread_Control *_Thread_Get ( { uint32_t the_api; uint32_t the_class; + Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; @@ -75,7 +76,13 @@ Thread_Control *_Thread_Get ( goto done; } - information = _Objects_Information_table[ the_api ][ the_class ]; + api_information = _Objects_Information_table[ the_api ]; + if ( !api_information ) { + *location = OBJECTS_ERROR; + goto done; + } + + information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; goto done; |