Fix for uninitialized variables and possible overflow

This commit is contained in:
William Robinet 2020-10-03 12:42:16 +02:00
parent c651800ab1
commit 749258b45c
2 changed files with 3 additions and 3 deletions

View file

@ -466,7 +466,7 @@ static int data_ssl_analyzer(_obj,seg,direction)
{
int _status,r;
r_queue *q;
segment *last,*q_next,*assembled;
segment *last,*q_next=NULL,*assembled;
ssl_obj *ssl=(ssl_obj *)_obj;
int offset=0;

View file

@ -489,7 +489,7 @@ static int ssl_create_session_lookup_key(ssl,id,idlen,keyp,keyl)
*keyl=idlen;
key+=idlen;
sprintf(key,"%s:%d",ssl->server_name,ssl->server_port);
snprintf((char *)key,l,"%s:%d",ssl->server_name,ssl->server_port);
*keyl+=strlen(key);
_status=0;
@ -906,7 +906,7 @@ static int ssl_generate_keying_material(ssl,d)
UCHAR _key_c[16],_key_s[16];
int needed;
int r,_status;
UCHAR *ptr,*c_wk,*s_wk,*c_mk,*s_mk,*c_iv,*s_iv;
UCHAR *ptr,*c_wk,*s_wk,*c_mk=NULL,*s_mk=NULL,*c_iv=NULL,*s_iv=NULL;
if(!d->MS){
if(r=r_data_alloc(&d->MS,48))