From 1bd3d491b176b617684ccb5f74b6eb302282a7ad Mon Sep 17 00:00:00 2001 From: ValdikSS Date: Thu, 19 Nov 2020 20:48:08 +0300 Subject: [PATCH] Increase zlib outbuffer size. Insufficient for E5787Ph firmware file. --- ptable.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ptable.c b/ptable.c index 7ade3f8..afe6a1d 100644 --- a/ptable.c +++ b/ptable.c @@ -238,11 +238,11 @@ if ((*(uint16_t*)ptable[npart].pimage) == 0xda78) { if ((ptable[npart].pimage[0] == 0x5d) && (*(uint64_t*)(ptable[npart].pimage+5) == 0xffffffffffffffff)) { ptable[npart].zflag=ptable[npart].hd.psize; // сохраняем сжатый размер - zlen=52428800; - zbuf=malloc(zlen); // буфер в 50М + zlen=100 * 1024 * 1024; + zbuf=malloc(zlen); // буфер в 100М // распаковываем образ раздела zlen=lzma_decode(ptable[npart].pimage, ptable[npart].hd.psize, zbuf); - if (zlen>52428800) { + if (zlen>100 * 1024 * 1024) { printf("\n Превышен размер буфера\n"); exit(1); }