commit 41a5397

Michael Forney  ·  2026-05-17 08:42:33 +0000 UTC
parent 92e500c
openbsd: Fix implicit pointer sign conversion in nc
2 files changed,  +26, -1
+25, -0
 1@@ -0,0 +1,25 @@
 2+From 4da7b308eb6d8c7947d3ea0106a49c8ab6e3481a Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 17 May 2026 01:40:40 -0700
 5+Subject: [PATCH] nc: Use explicit cast for pointer sign conversion
 6+
 7+---
 8+ usr.bin/nc/netcat.c | 2 +-
 9+ 1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
12+index 74d18595309..bb170967d8e 100644
13+--- a/usr.bin/nc/netcat.c
14++++ b/usr.bin/nc/netcat.c
15+@@ -1751,7 +1751,7 @@ save_peer_cert(struct tls *tls_ctx, FILE *fp)
16+ 	const char *pem;
17+ 	size_t plen;
18+ 
19+-	if ((pem = tls_peer_cert_chain_pem(tls_ctx, &plen)) == NULL)
20++	if ((pem = (char *)tls_peer_cert_chain_pem(tls_ctx, &plen)) == NULL)
21+ 		errx(1, "Can't get peer certificate");
22+ 	if (fprintf(fp, "%.*s", (int)plen, pem) < 0)
23+ 		err(1, "unable to save peer cert");
24+-- 
25+2.54.0
26+
+1, -1
1@@ -1 +1 @@
2-7.8 r2
3+7.8 r3