fix index out of range
This commit is contained in:
@@ -40,7 +40,7 @@ namespace Shadowsocks.Encrypt
|
||||
outlength = length + ivLen;
|
||||
OpenSSL.EVP_CipherUpdate(_encryptCtx, tempbuf, out outlength, buf, length);
|
||||
outlength = length + ivLen;
|
||||
Buffer.BlockCopy(tempbuf, 0, outbuf, ivLen, outlength);
|
||||
Buffer.BlockCopy(tempbuf, 0, outbuf, ivLen, length);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace Shadowsocks.Encrypt
|
||||
break;
|
||||
}
|
||||
outlength = length + ivLen;
|
||||
Buffer.BlockCopy(tempbuf, 0, outbuf, ivLen, outlength);
|
||||
Buffer.BlockCopy(tempbuf, 0, outbuf, ivLen, length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user