forked from Imagelibrary/rtems
2004-07-24 Joel Sherrill <joel@OARcorp.com>
PR 659/rtems * src/heapsizeofuserarea.c, src/objectmp.c, src/threadinitialize.c, src/threadstackallocate.c: Check that address specified is in the heap.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2004-07-24 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
PR 659/rtems
|
||||
* src/heapsizeofuserarea.c, src/objectmp.c, src/threadinitialize.c,
|
||||
src/threadstackallocate.c: Check that address specified is in the
|
||||
heap.
|
||||
|
||||
2004-07-14 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
PR 650/rtems
|
||||
|
||||
@@ -44,10 +44,16 @@ boolean _Heap_Size_of_user_area(
|
||||
Heap_Block *next_block;
|
||||
unsigned32 the_size;
|
||||
|
||||
if ( !_Addresses_Is_in_range(
|
||||
starting_address, (void *)the_heap->start, (void *)the_heap->final ) )
|
||||
return( FALSE );
|
||||
|
||||
the_block = _Heap_User_block_at( starting_address );
|
||||
|
||||
if ( !_Heap_Is_block_in( the_heap, the_block ) ||
|
||||
_Heap_Is_block_free( the_block ) )
|
||||
if ( !_Heap_Is_block_in( the_heap, the_block ) )
|
||||
return( FALSE );
|
||||
|
||||
if ( _Heap_Is_block_free( the_block ) )
|
||||
return( FALSE );
|
||||
|
||||
the_size = _Heap_Block_size( the_block );
|
||||
|
||||
Reference in New Issue
Block a user