# HG changeset patch # User Matti Hamalainen # Date 1526090105 -10800 # Node ID 2acf4578d2e6102cf6d3e924cf44919f028e7be8 # Parent af729e29a6f6d1f70f71bb5a45fb761e473ddcdd Cleanup. diff -r af729e29a6f6 -r 2acf4578d2e6 tools/lib64fmts.c --- a/tools/lib64fmts.c Sat May 12 04:54:36 2018 +0300 +++ b/tools/lib64fmts.c Sat May 12 04:55:05 2018 +0300 @@ -181,9 +181,8 @@ if ((res = dmGrowBufAlloc(&tmp, len + 4, 4)) != DMERR_OK) return res; - tmp.len = len; - memcpy(tmp.data, buf, len); - tmp.data[tmp.len++] = 0; + memcpy(tmp.data, buf, len + 1); + tmp.len = len + 1; // Now do an RLE decode on the enlarged buffer cfg.type = DM_COMP_RLE_MARKER;