From f5434bdbd02290050140f3b396bea6bb773f2850 Mon Sep 17 00:00:00 2001 From: BreakWa11 Date: Sat, 25 Jun 2016 00:17:41 +0800 Subject: [PATCH] process empty str --- shadowsocks/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shadowsocks/common.py b/shadowsocks/common.py index 16386bd..e1f574c 100644 --- a/shadowsocks/common.py +++ b/shadowsocks/common.py @@ -150,6 +150,8 @@ def pack_addr(address): return b'\x03' + chr(len(address)) + address def pre_parse_header(data): + if not data: + return None datatype = ord(data[0]) if datatype == 0x80: if len(data) <= 2: