View | Details | Raw Unified | Return to bug 20701
Collapse All | Expand All

(-)a/ss5/modules/mod_socks4/SS5Mod_socks4.c (-1 / +2 lines)
Lines 44-50 S5RetCode RequestParsing(struct _SS5AuthInfo *ai, struct _SS5MethodInfo *mi, str Link Here
44
  memcpy(sd->TcpRequest,sd->MethodRequest,sd->MethodBytesReceived);
44
  memcpy(sd->TcpRequest,sd->MethodRequest,sd->MethodBytesReceived);
45
45
46
  ri->Ver=mi->Ver;
46
  ri->Ver=mi->Ver;
47
  ri->Cmd=(unsigned char)sd->TcpRequest[1];
47
  if( (ri->Cmd=(unsigned char)sd->TcpRequest[1]) > 3  || ri->Cmd < 1)
48
    return ERR;
48
49
49
  if( !(unsigned char)sd->TcpRequest[4] && !(unsigned char)sd->TcpRequest[5] && !(unsigned char)sd->TcpRequest[6] && (unsigned char)sd->TcpRequest[7] ) {
50
  if( !(unsigned char)sd->TcpRequest[4] && !(unsigned char)sd->TcpRequest[5] && !(unsigned char)sd->TcpRequest[6] && (unsigned char)sd->TcpRequest[7] ) {
50
      /*
51
      /*
(-)a/ss5/modules/mod_socks5/SS5Mod_socks5.c (-1 / +2 lines)
Lines 153-159 S5RetCode RequestParsing(struct _SS5ClientInfo *ci, struct _SS5Socks5Data *sd, s Link Here
153
  }
153
  }
154
154
155
  ri->Ver=(unsigned char)sd->TcpRequest[0];
155
  ri->Ver=(unsigned char)sd->TcpRequest[0];
156
  ri->Cmd=(unsigned char)sd->TcpRequest[1];
156
  if( (ri->Cmd=(unsigned char)sd->TcpRequest[1]) > 3 || ri->Cmd < 1)
157
    return ERR;
157
158
158
  switch( sd->TcpRequest[3] ) {
159
  switch( sd->TcpRequest[3] ) {
159
    case IPV4:
160
    case IPV4:

Return to bug 20701