Initialize variables

This commit is contained in:
William Robinet 2023-08-16 15:08:26 +02:00
parent 6004e71647
commit f395a3a3ce
No known key found for this signature in database
GPG key ID: 003FA3DF74C7A949
3 changed files with 6 additions and 4 deletions

View file

@ -165,7 +165,8 @@ void pcap_cb(u_char *ptr, const struct pcap_pkthdr *hdr, const u_char *data) {
n_handler *n;
int len;
struct ether_header *e_hdr = (struct ether_header *)data;
int type, cleaned_conn;
int type = ETHERTYPE_IP;
int cleaned_conn;
n = (n_handler *)ptr;
if(hdr->caplen != hdr->len)

View file

@ -125,7 +125,7 @@ static int decode_ContentType_application_data(ssl_obj *ssl,
if(NET_print_flags & NET_PRINT_JSON) {
json_object_object_add(jobj, "msg_data",
json_object_new_string_len(d.data, d.len));
json_object_new_string_len((char *) d.data, d.len));
} else
P_(P_AD) { print_data(ssl, &d); }
else {

View file

@ -1081,7 +1081,7 @@ static int hkdf_expand_label(ssl_obj *ssl,
Data *context,
uint16_t length,
UCHAR **out) {
int r;
int r = -1;
size_t outlen = length;
EVP_PKEY_CTX *pctx;
@ -1299,7 +1299,8 @@ static int read_hex_string(char *str, UCHAR *buf, int n) {
return 0;
}
static int ssl_read_key_log_file(ssl_obj *ssl, ssl_decoder *d) {
int r, _status, n, i;
int r = -1;
int _status, n, i;
size_t l = 0;
char *line, *d_client_random, *label, *client_random, *secret;
if(ssl->version == TLSV13_VERSION &&