forked from Imagelibrary/rtems
2004-05-06 Joel Sherrill <joel@OARcorp.com>
PR 618/rtems * include/rtems/score/object.h, src/coretodvalidate.c, src/objectnametoid.c: Add NULL checks.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2004-05-06 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
PR 618/rtems
|
||||
* include/rtems/score/object.h, src/coretodvalidate.c,
|
||||
src/objectnametoid.c: Add NULL checks.
|
||||
|
||||
2004-01-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* macros/rtems/score/README: Remove (Redundant with macros/README).
|
||||
|
||||
@@ -456,6 +456,7 @@ boolean _Objects_Compare_name_raw(
|
||||
typedef enum {
|
||||
OBJECTS_SUCCESSFUL,
|
||||
OBJECTS_INVALID_NAME,
|
||||
OBJECTS_INVALID_ADDRESS,
|
||||
OBJECTS_INVALID_NODE
|
||||
} Objects_Name_to_id_errors;
|
||||
|
||||
|
||||
@@ -40,7 +40,8 @@ boolean _TOD_Validate(
|
||||
{
|
||||
unsigned32 days_in_month;
|
||||
|
||||
if ((the_tod->ticks >= _TOD_Ticks_per_second) ||
|
||||
if ((!the_tod) ||
|
||||
(the_tod->ticks >= _TOD_Ticks_per_second) ||
|
||||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
|
||||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
|
||||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
|
||||
|
||||
@@ -56,6 +56,9 @@ Objects_Name_to_id_errors _Objects_Name_to_id(
|
||||
unsigned32 name_length;
|
||||
Objects_Name_comparators compare_them;
|
||||
|
||||
if ( !id )
|
||||
return OBJECTS_INVALID_ADDRESS;
|
||||
|
||||
if ( name == 0 )
|
||||
return OBJECTS_INVALID_NAME;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user