summaryrefslogtreecommitdiff
path: root/sys/ddb
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-08-11 02:56:36 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-08-11 02:56:36 +0000
commit9038d26f3d0a4c07e8de087ca235ffee757d2096 (patch)
treef3f83988f862776c5736f8dd3dde63181198b563 /sys/ddb
parentc455698f67e1fa68a06d35e35659f4f1944ee8ed (diff)
Revert uLong -> z_off_t change in the kernel
The kernel source assumes the original zlib ABI. There is no reason to stick to this local change. Pull in a fix matching ctfdump.c -r1.26. This is hopefully the last change necessary to undo a painful hack that was committed 19 years ago without ok. Someone owes me a lot of beer... ok millert
Diffstat (limited to 'sys/ddb')
-rw-r--r--sys/ddb/db_ctf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ddb/db_ctf.c b/sys/ddb/db_ctf.c
index ddb7ae8f777..bfb0c6d24e1 100644
--- a/sys/ddb/db_ctf.c
+++ b/sys/ddb/db_ctf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_ctf.c,v 1.31 2021/10/27 21:21:35 jasper Exp $ */
+/* $OpenBSD: db_ctf.c,v 1.32 2022/08/11 02:56:35 tb Exp $ */
/*
* Copyright (c) 2016-2017 Martin Pieuchot
@@ -547,8 +547,8 @@ db_ctf_decompress(const char *buf, size_t size, off_t len)
goto exit;
}
- if (stream.total_out != len) {
- db_printf("decompression failed: %llu != %llu",
+ if (len < 0 || (uintmax_t)stream.total_out != (uintmax_t)len) {
+ db_printf("decompression failed: %lu != %lld",
stream.total_out, len);
goto exit;
}