Changeset 0a2c96c in mainline


Ignore:
Timestamp:
2019-09-29T13:58:49Z (5 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ef0a3375
Parents:
1a4ec93f
git-author:
Jakub Jermar <jakub@…> (2019-09-29 13:57:17)
git-committer:
Jakub Jermar <jakub@…> (2019-09-29 13:58:49)
Message:

Check for unsigned wrap-around in malloc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/malloc.c

    r1a4ec93f r0a2c96c  
    187187void *malloc(size_t size)
    188188{
     189        if (size + _offset < size)
     190                return NULL;
     191
    189192        void *obj = mem_alloc(alignof(max_align_t), size + _offset) + _offset;
    190193
Note: See TracChangeset for help on using the changeset viewer.