diff options
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/src/objectgetinfo.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cpukit/score/src/objectgetinfo.c b/cpukit/score/src/objectgetinfo.c index c7d7d81b06..033f827891 100644 --- a/cpukit/score/src/objectgetinfo.c +++ b/cpukit/score/src/objectgetinfo.c @@ -24,11 +24,16 @@ Objects_Information *_Objects_Get_information( ) { Objects_Information *info; + int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; - if ( !the_class || the_class > _Objects_API_maximum_class(the_api) ) + if ( !the_class ) + return NULL; + + the_class_api_maximum = _Objects_API_maximum_class( the_api ); + if ( the_class_api_maximum < 0 || the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) |