mirror of
https://github.com/adulau/ssldump.git
synced 2024-11-22 09:27:04 +00:00
Merge pull request #13 from alperakcan/master
fix ssl record queue data read
This commit is contained in:
commit
f7585c4bee
1 changed files with 4 additions and 2 deletions
|
@ -347,7 +347,9 @@ static int read_ssl_record(obj,q,seg,offset,lastp,offsetp)
|
||||||
|
|
||||||
switch(q->state){
|
switch(q->state){
|
||||||
case SSL_READ_NONE:
|
case SSL_READ_NONE:
|
||||||
q->read_left=SSL_HEADER_SIZE;
|
if (SSL_HEADER_SIZE<q->len)
|
||||||
|
ABORT(-1);
|
||||||
|
q->read_left=SSL_HEADER_SIZE-q->len;
|
||||||
if(r=read_data(q,seg,offset,&last,&offset))
|
if(r=read_data(q,seg,offset,&last,&offset))
|
||||||
ABORT(r);
|
ABORT(r);
|
||||||
|
|
||||||
|
@ -374,9 +376,9 @@ static int read_ssl_record(obj,q,seg,offset,lastp,offsetp)
|
||||||
if(!(q->data=realloc(q->data,rec_len+5)))
|
if(!(q->data=realloc(q->data,rec_len+5)))
|
||||||
ABORT(R_NO_MEMORY);
|
ABORT(R_NO_MEMORY);
|
||||||
q->_allocated=rec_len+SSL_HEADER_SIZE;
|
q->_allocated=rec_len+SSL_HEADER_SIZE;
|
||||||
|
q->ptr=q->data+SSL_HEADER_SIZE;
|
||||||
};
|
};
|
||||||
|
|
||||||
q->ptr=q->data+SSL_HEADER_SIZE;
|
|
||||||
q->read_left=rec_len;
|
q->read_left=rec_len;
|
||||||
|
|
||||||
case SSL_READ_HEADER:
|
case SSL_READ_HEADER:
|
||||||
|
|
Loading…
Reference in a new issue