Commit Diff


commit - ae1e948a3179529896cf69272a0c1b45ab8ced1c
commit + dbaa2362d16467d001f75172d6b67a47da142049
blob - 7b925666bac45b450541651a1bbcae461660613b
blob + bb78f39fb48143a2fb41c1ef4d7d3feb6ff21e49
--- lib/deflate.c
+++ lib/deflate.c
@@ -78,7 +78,7 @@ done:
 }
 
 static void
-csum_output(struct got_deflate_checksum *csum, const char *buf, size_t len)
+csum_output(struct got_deflate_checksum *csum, const uint8_t *buf, size_t len)
 {
 	if (csum->output_crc)
 		*csum->output_crc = crc32(*csum->output_crc, buf, len);
blob - bb41647fe85bfae60cb467b43a93a531452887de
blob + 6eee636c9f50d9e8a6efef4d4aad6daf6373cdf1
--- lib/got_lib_deflate.h
+++ lib/got_lib_deflate.h
@@ -24,9 +24,9 @@ struct got_deflate_checksum {
 
 struct got_deflate_buf {
 	z_stream z;
-	char *inbuf;
+	uint8_t *inbuf;
 	size_t inlen;
-	char *outbuf;
+	uint8_t *outbuf;
 	size_t outlen;
 	int flags;
 #define GOT_DEFLATE_F_HAVE_MORE		0x01
blob - 3833fedc8b779ac09969970c0ae89d5732c651cf
blob + 4ddc5aac63e46a5562147f8b561c4dea76cad65c
--- lib/got_lib_inflate.h
+++ lib/got_lib_inflate.h
@@ -30,9 +30,9 @@ struct got_inflate_checksum {
 
 struct got_inflate_buf {
 	z_stream z;
-	char *inbuf;
+	uint8_t *inbuf;
 	size_t inlen;
-	char *outbuf;
+	uint8_t *outbuf;
 	size_t outlen;
 	int flags;
 #define GOT_INFLATE_F_HAVE_MORE		0x01
blob - d003180a59ce769ce2902ad25521f09c341f0076
blob + 263a705b78418b19bb27015994b68ae432d26121
--- lib/inflate.c
+++ lib/inflate.c
@@ -82,7 +82,7 @@ done:
 }
 
 static void
-csum_input(struct got_inflate_checksum *csum, const char *buf, size_t len)
+csum_input(struct got_inflate_checksum *csum, const uint8_t *buf, size_t len)
 {
 	if (csum->input_crc)
 		*csum->input_crc = crc32(*csum->input_crc, buf, len);
@@ -92,7 +92,7 @@ csum_input(struct got_inflate_checksum *csum, const ch
 }
 
 static void
-csum_output(struct got_inflate_checksum *csum, const char *buf, size_t len)
+csum_output(struct got_inflate_checksum *csum, const uint8_t *buf, size_t len)
 {
 	if (csum->output_crc)
 		*csum->output_crc = crc32(*csum->output_crc, buf, len);
@@ -117,7 +117,7 @@ got_inflate_read(struct got_inflate_buf *zb, FILE *f, 
 	if (consumed)
 		*consumed = 0;
 	do {
-		char *csum_in = NULL, *csum_out = NULL;
+		uint8_t *csum_in = NULL, *csum_out = NULL;
 		size_t csum_avail_in = 0, csum_avail_out = 0;
 
 		if (z->avail_in == 0) {
@@ -177,7 +177,7 @@ got_inflate_read_fd(struct got_inflate_buf *zb, int fd
 	if (consumed)
 		*consumed = 0;
 	do {
-		char *csum_in = NULL, *csum_out = NULL;
+		uint8_t *csum_in = NULL, *csum_out = NULL;
 		size_t csum_avail_in = 0, csum_avail_out = 0;
 
 		if (z->avail_in == 0) {
@@ -236,7 +236,7 @@ got_inflate_read_mmap(struct got_inflate_buf *zb, uint
 	*consumed = 0;
 
 	do {
-		char *csum_in = NULL, *csum_out = NULL;
+		uint8_t *csum_in = NULL, *csum_out = NULL;
 		size_t csum_avail_in = 0, csum_avail_out = 0;
 		size_t last_total_in = zb->z.total_in;
 
blob - 4bebeb4f4082dbe85a1bc266597d4aaf35b7ba97
blob + 1dc86652038f22a8bbfaad63930eb197d314c21b
--- lib/object_parse.c
+++ lib/object_parse.c
@@ -209,7 +209,7 @@ got_object_read_header(struct got_object **obj, int fd
 {
 	const struct got_error *err;
 	struct got_inflate_buf zb;
-	char *buf;
+	uint8_t *buf;
 	const size_t zbsize = 64;
 	size_t outlen, totlen;
 	int nbuf = 1;
@@ -233,7 +233,7 @@ got_object_read_header(struct got_object **obj, int fd
 			break;
 		totlen += outlen;
 		if (memchr(zb.outbuf, '\0', outlen) == NULL) {
-			char *newbuf;
+			uint8_t *newbuf;
 			nbuf++;
 			newbuf = recallocarray(buf, nbuf - 1, nbuf, zbsize);
 			if (newbuf == NULL) {