# HG changeset patch # User Matti Hamalainen # Date 1526091420 -10800 # Node ID 203e00a4dfc053936dff4cee2968048fd0873779 # Parent 237be4e035855c79a0f03907bd57955e6a280a0a Fix FunPaint2 packed format decoding. diff -r 237be4e03585 -r 203e00a4dfc0 tools/lib64fmts.c --- a/tools/lib64fmts.c Sat May 12 05:03:02 2018 +0300 +++ b/tools/lib64fmts.c Sat May 12 05:17:00 2018 +0300 @@ -331,11 +331,9 @@ DMGrowBuf mem; DMCompParams cfg; - dmGrowBufInit(&mem); - cfg.type = DM_COMP_RLE_MARKER; cfg.rleMarker = *(buf + 15); - if ((res = dmDecodeGenericRLE(&mem, buf + FUNPAINT2_HEADER_SIZE, buf + len, &cfg)) != DMERR_OK) + if ((res = dmDecodeGenericRLEAlloc(&mem, buf + FUNPAINT2_HEADER_SIZE, buf + len, &cfg)) != DMERR_OK) goto out; res = dmC64DecodeGenericBMP(img, mem.data, mem.len, fmt);