From 7f47e9ba88bb303e9a69588988bf3b26e0bdcb12 Mon Sep 17 00:00:00 2001 From: tb <> Date: Wed, 14 May 2025 08:56:41 +0000 Subject: nc: disallow -T with = when arguments are not key=value pairs From Ross L Richardson --- src/usr.bin/nc/netcat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/usr.bin') diff --git a/src/usr.bin/nc/netcat.c b/src/usr.bin/nc/netcat.c index 8c60fd1882..67beb10d0a 100644 --- a/src/usr.bin/nc/netcat.c +++ b/src/usr.bin/nc/netcat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.229 2024/11/02 17:19:27 tb Exp $ */ +/* $OpenBSD: netcat.c,v 1.230 2025/05/14 08:56:41 tb Exp $ */ /* * Copyright (c) 2001 Eric Jackson * Copyright (c) 2015 Bob Beck. All rights reserved. @@ -1692,6 +1692,8 @@ process_tls_opt(char *s, int *flags) errx(1, "invalid tls value `%s'", s); *t->value = v; } else { + if (v != NULL) + errx(1, "invalid tls value `%s'", s); *flags |= t->flag; } return 1; -- cgit v1.2.3-55-g6feb