瀏覽代碼

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 年之前
父節點
當前提交
a63c525fb7
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. +4
    -4
      pipi/codec/oric.c

+ 4
- 4
pipi/codec/oric.c 查看文件

@@ -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…
取消
儲存