Pārlūkot izejas kodu

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 pirms 16 gadiem
vecāks
revīzija
a63c525fb7
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. +4
    -4
      pipi/codec/oric.c

+ 4
- 4
pipi/codec/oric.c Parādīt failu

@@ -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++)


Notiek ielāde…
Atcelt
Saglabāt