Browse Source

libpipi: fix a buffer underallocation.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2943 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 years ago
parent
commit
a63c525fb7
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      pipi/codec/oric.c

+ 4
- 4
pipi/codec/oric.c View File

@@ -529,11 +529,11 @@ static void write_screen(float const *data, uint8_t *screen)

stride = (WIDTH + 1) * 3;

src = malloc((WIDTH + 1) * (HEIGHT + 1) * 3);
memset(src, 0, (WIDTH + 1) * (HEIGHT + 1) * 3);
src = malloc((WIDTH + 1) * (HEIGHT + 1) * 3 * sizeof(int));
memset(src, 0, (WIDTH + 1) * (HEIGHT + 1) * 3 * sizeof(int));

dst = malloc((WIDTH + 1) * (HEIGHT + 1) * 3);
memset(dst, 0, (WIDTH + 1) * (HEIGHT + 1) * 3);
dst = malloc((WIDTH + 1) * (HEIGHT + 1) * 3 * sizeof(int));
memset(dst, 0, (WIDTH + 1) * (HEIGHT + 1) * 3 * sizeof(int));

/* Import pixels into our custom format */
for(y = 0; y < HEIGHT; y++)


Loading…
Cancel
Save