Changeset f0da6855 in mainline


Ignore:
Timestamp:
2012-10-30T11:52:02Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
34b9299
Parents:
c0f8909
Message:

Take the size of the array's element into account when allocating memory for it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/clui/tinput.c

    rc0f8909 rf0da6855  
    104104static void tinput_display_tail(tinput_t *ti, size_t start, size_t pad)
    105105{
    106         wchar_t *dbuf = malloc(INPUT_MAX_SIZE + 1);
     106        wchar_t *dbuf = malloc((INPUT_MAX_SIZE + 1) * sizeof(wchar_t));
    107107        if (!dbuf)
    108108                return;
Note: See TracChangeset for help on using the changeset viewer.