Changeset 2943 for libpipi


Ignore:
Timestamp:
Oct 13, 2008, 4:06:21 AM (12 years ago)
Author:
Sam Hocevar
Message:

libpipi: fix a buffer underallocation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/pipi/codec/oric.c

    r2942 r2943  
    530530    stride = (WIDTH + 1) * 3;
    531531
    532     src = malloc((WIDTH + 1) * (HEIGHT + 1) * 3);
    533     memset(src, 0, (WIDTH + 1) * (HEIGHT + 1) * 3);
    534 
    535     dst = malloc((WIDTH + 1) * (HEIGHT + 1) * 3);
    536     memset(dst, 0, (WIDTH + 1) * (HEIGHT + 1) * 3);
     532    src = malloc((WIDTH + 1) * (HEIGHT + 1) * 3 * sizeof(int));
     533    memset(src, 0, (WIDTH + 1) * (HEIGHT + 1) * 3 * sizeof(int));
     534
     535    dst = malloc((WIDTH + 1) * (HEIGHT + 1) * 3 * sizeof(int));
     536    memset(dst, 0, (WIDTH + 1) * (HEIGHT + 1) * 3 * sizeof(int));
    537537
    538538    /* Import pixels into our custom format */
Note: See TracChangeset for help on using the changeset viewer.