aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2017-10-06 13:37:20 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-10-06 13:37:20 +0000
commit549d24e9f70e33aac90ddaebf95a63409b058327 (patch)
treed9785a84ea32807eb6622002b93674895e97b388
parentd155a264dfe562806dd2d44aca7e272594a3e92e (diff)
downloadgcc-549d24e9f70e33aac90ddaebf95a63409b058327.zip
gcc-549d24e9f70e33aac90ddaebf95a63409b058327.tar.gz
gcc-549d24e9f70e33aac90ddaebf95a63409b058327.tar.bz2
ztest.c (test_large): Pass unsigned long *, not size_t *, to zlib uncompress function.
* ztest.c (test_large): Pass unsigned long *, not size_t *, to zlib uncompress function. From-SVN: r253491
-rw-r--r--libbacktrace/ChangeLog5
-rw-r--r--libbacktrace/ztest.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog
index 7aadc73..5540530 100644
--- a/libbacktrace/ChangeLog
+++ b/libbacktrace/ChangeLog
@@ -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 *.
diff --git a/libbacktrace/ztest.c b/libbacktrace/ztest.c
index 7226d6a..9ce4b21 100644
--- a/libbacktrace/ztest.c
+++ b/libbacktrace/ztest.c
@@ -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)