mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-27 19:23:40 +00:00
fix #393
This commit is contained in:
+2
-2
@@ -160,11 +160,11 @@ static char *get_action(char *buf, int len) {
|
||||
char *action;
|
||||
int pos = 0;
|
||||
|
||||
while(isspace(buf[pos]) && pos < len) pos++;
|
||||
while(isspace((unsigned char)buf[pos]) && pos < len) pos++;
|
||||
if (pos == len) return NULL;
|
||||
action = buf + pos;
|
||||
|
||||
while((!isspace(buf[pos]) && buf[pos] != ':') && pos < len) pos++;
|
||||
while((!isspace((unsigned char)buf[pos]) && buf[pos] != ':') && pos < len) pos++;
|
||||
buf[pos] = '\0';
|
||||
|
||||
return action;
|
||||
|
||||
Reference in New Issue
Block a user