Ongoing cleanups.

This commit is contained in:
Markus F.X.J. Oberhumer
2016-10-07 23:07:56 +02:00
parent 56eb02280f
commit 38a265741c
12 changed files with 63 additions and 61 deletions
+3 -1
View File
@@ -211,7 +211,7 @@ int upx_zlib_test_overlap ( const upx_bytep buf,
return UPX_E_ERROR;
// NOTE: there is a very tiny possibility that decompression has
// succeeded but the data is not restored correctly because of
// in-place buffer overlapping.
// in-place buffer overlapping, so we use an extra memcmp().
if (tbuf != NULL && memcmp(tbuf, b, *dst_len) != 0)
return UPX_E_ERROR;
return UPX_E_OK;
@@ -236,10 +236,12 @@ const char *upx_zlib_version_string(void)
return zlibVersion();
}
#if 0 /* UNUSED */
unsigned upx_zlib_adler32(const void *buf, unsigned len, unsigned adler)
{
return adler32(adler, (const Bytef *) buf, len);
}
#endif
#if 0 /* UNUSED */
unsigned upx_zlib_crc32(const void *buf, unsigned len, unsigned crc)