summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/channels.c b/channels.c
index 1052b80ca..9efe89c9c 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.330 2014/02/15 23:05:36 djm Exp $ */ 1/* $OpenBSD: channels.c,v 1.331 2014/02/26 20:29:29 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1072,6 +1072,9 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset)
1072 buffer_get(&c->input, (char *)&s4_req.dest_addr, 4); 1072 buffer_get(&c->input, (char *)&s4_req.dest_addr, 4);
1073 have = buffer_len(&c->input); 1073 have = buffer_len(&c->input);
1074 p = buffer_ptr(&c->input); 1074 p = buffer_ptr(&c->input);
1075 if (memchr(p, '\0', have) == NULL)
1076 fatal("channel %d: decode socks4: user not nul terminated",
1077 c->self);
1075 len = strlen(p); 1078 len = strlen(p);
1076 debug2("channel %d: decode socks4: user %s/%d", c->self, p, len); 1079 debug2("channel %d: decode socks4: user %s/%d", c->self, p, len);
1077 len++; /* trailing '\0' */ 1080 len++; /* trailing '\0' */