zygo

ncurses gopher client
Log | Files | Refs

commit 9015bd315a48c3f79232ec5993e26ddb2ef79173
parent 5821d041342e44ae655a5ba1de73a7671f7455d9
Author: hhvn <dev@hhvn.uk>
Date:   Wed,  9 Feb 2022 18:55:16 +0000

Check for nulls before comparing ret->{server,port}

Diffstat:
Mzygo.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zygo.c b/zygo.c @@ -293,7 +293,7 @@ gophertoelem(Elem *from, const char *line) { * the above loop, set it here for non-gopher+ */ if (!ret->port) ret->port = estrdup(tmp); - if (from && from->tls && + if (from && from->tls && ret->server && ret->port && strcmp(ret->server, from->server) == 0 && strcmp(ret->port, from->port) == 0) ret->tls = 1;