Changeset e7c3fa0 in mainline


Ignore:
Timestamp:
2012-07-23T04:48:55Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ea8b91d
Parents:
7aafdb86
Message:

Detect integer overflow in lcm() when cumputing alignment in malloc_internal().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/malloc.c

    r7aafdb86 re7c3fa0  
    707707       
    708708        size_t falign = lcm(align, BASE_ALIGN);
     709
     710        /* Check for integer overflow. */
     711        if (falign < align)
     712                return NULL;
     713
    709714        size_t gross_size = GROSS_SIZE(size);
    710715       
Note: See TracChangeset for help on using the changeset viewer.