for a protocol string.
Issue found by semarie@, who also provided the diff.
-/* $OpenBSD: tls_config.c,v 1.44 2017/09/25 18:07:03 jsing Exp $ */
+/* $OpenBSD: tls_config.c,v 1.45 2017/12/09 16:46:08 jsing Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
char *s, *p, *q;
int negate;
- if (protostr == NULL)
- return TLS_PROTOCOLS_DEFAULT;
+ if (protostr == NULL) {
+ *protocols = TLS_PROTOCOLS_DEFAULT;
+ return (0);
+ }
if ((s = strdup(protostr)) == NULL)
return (-1);