mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-07 12:06:27 +00:00
Fix for infinite loop in Ciphers Suite decoding
This commit is contained in:
parent
2c9003f0cf
commit
082cc7afed
1 changed files with 7 additions and 1 deletions
|
@ -174,7 +174,7 @@ static int decode_HandshakeType_ClientHello(ssl,dir,seg,data)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
UINT4 vj,vn,cs,cslen,complen,comp;
|
UINT4 vj,vn,cs,cslen,complen,comp,odd;
|
||||||
Data session_id,random;
|
Data session_id,random;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
|
@ -204,6 +204,12 @@ static int decode_HandshakeType_ClientHello(ssl,dir,seg,data)
|
||||||
SSL_DECODE_UINT16(ssl,"cipher Suites len",0,data,&cslen);
|
SSL_DECODE_UINT16(ssl,"cipher Suites len",0,data,&cslen);
|
||||||
explain(ssl,"cipher suites\n");
|
explain(ssl,"cipher suites\n");
|
||||||
|
|
||||||
|
odd = cslen % 2;
|
||||||
|
if(odd) {
|
||||||
|
printf("Wrong cipher suites length, fixing ...\n");
|
||||||
|
cslen -= odd;
|
||||||
|
}
|
||||||
|
|
||||||
for(;cslen;cslen-=2){
|
for(;cslen;cslen-=2){
|
||||||
ssl_decode_enum(ssl,0,2,cipher_suite_decoder,
|
ssl_decode_enum(ssl,0,2,cipher_suite_decoder,
|
||||||
0,data,&cs);
|
0,data,&cs);
|
||||||
|
|
Loading…
Reference in a new issue