Changeset 006af6ac in rtems


Ignore:
Timestamp:
Jun 14, 2016, 7:26:12 AM (3 years ago)
Author:
Alexander Krutwig <alexander.krutwig@…>
Branches:
master
Children:
0fddefe
Parents:
9bfad8c
git-author:
Alexander Krutwig <alexander.krutwig@…> (06/14/16 07:26:12)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/22/16 14:07:43)
Message:

score: Improve heap protection

Check block pointers of deferred free list before use.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/heapallocate.c

    r9bfad8c r006af6ac  
    4444
    4545      for ( count = 0; count < blocks_to_free_count; ++count ) {
    46         Heap_Block *next_block_to_free =
     46        Heap_Block *next_block_to_free;
     47
     48        if ( !_Heap_Is_block_in_heap( heap, block_to_free ) ) {
     49          _Heap_Protection_block_error( heap, block_to_free );
     50        }
     51
     52        next_block_to_free =
    4753          block_to_free->Protection_begin.next_delayed_free_block;
    48 
    4954        block_to_free->Protection_begin.next_delayed_free_block =
    5055          HEAP_PROTECTION_OBOLUS;
Note: See TracChangeset for help on using the changeset viewer.