From bf82d5c68601992ffde13dc7cf55a5bd3ec47cb5 Mon Sep 17 00:00:00 2001 From: bzt Date: Thu, 8 Apr 2021 18:57:47 +0200 Subject: [PATCH] Fixed gzip crc --- mkbootimg/util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkbootimg/util.c b/mkbootimg/util.c index a5e2daf..3b62e2e 100644 --- a/mkbootimg/util.c +++ b/mkbootimg/util.c @@ -168,9 +168,9 @@ void initrdcompress() fs_base[0] = 0x1f; fs_base[1] = 0x8b; fs_base[2] = 0x8; fs_base[9] = 3; memcpy(fs_base + 4, &t, 4); memcpy(fs_base + 10, initrdgz + 2, initrdgz_len - 2); - memcpy(fs_base + 10 + initrdgz_len - 2, &crc, 4); - memcpy(fs_base + 14 + initrdgz_len - 2, &fs_len, 4); - fs_len = initrdgz_len - 2 + 18; + memcpy(fs_base + 10 + initrdgz_len - 6, &crc, 4); + memcpy(fs_base + 10 + initrdgz_len - 2, &fs_len, 4); + fs_len = initrdgz_len - 2 + 14; } free(initrdgz); }