ztest.c (test_large): Pass unsigned long *, not size_t *, to zlib uncompress function.
authorIan Lance Taylor <iant@golang.org>
Fri, 6 Oct 2017 13:37:20 +0000 (13:37 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 6 Oct 2017 13:37:20 +0000 (13:37 +0000)
* ztest.c (test_large): Pass unsigned long *, not size_t *, to
zlib uncompress function.

From-SVN: r253491

libbacktrace/ChangeLog
libbacktrace/ztest.c

index 7aadc7353ef267f70a38912060834da2147217a8..5540530ef4fd5af4bd9c7c300bc3c08ebf1566da 100644 (file)
@@ -1,3 +1,8 @@
+2017-10-06  Ian Lance Taylor  <iant@golang.org>
+
+       * ztest.c (test_large): Pass unsigned long *, not size_t *, to
+       zlib uncompress function.
+
 2017-10-05  Ian Lance Taylor  <iant@golang.org>
 
        * elf.c (elf_zlib_fetch): Change pval argument to uint64_t *.
index 7226d6a0a36ccd812a8e43f6ed9a1ecab99222e0..9ce4b21fcd1b98c88d1858d03494846b101ad88f 100644 (file)
@@ -369,6 +369,8 @@ test_large (struct backtrace_state *state)
 
   for (i = 0; i < trials; ++i)
     {
+      unsigned long uncompress_sizearg;
+
       cid = ZLIB_CLOCK_GETTIME_ARG;
       if (clock_gettime (cid, &ts1) < 0)
        {
@@ -406,7 +408,8 @@ test_large (struct backtrace_state *state)
          return;
        }
 
-      r = uncompress (uncompressed_buf, &uncompressed_bufsize,
+      uncompress_sizearg = uncompressed_bufsize;
+      r = uncompress (uncompressed_buf, &uncompress_sizearg,
                      compressed_buf + 12, compressed_bufsize - 12);
 
       if (clock_gettime (cid, &ts2) < 0)