Fix bug in parsing packets with short IETF header: do not overwrite flags

This manifested as a memory leak in a unit test.  The regular library code
does not set any pi_flags before parsing the packet, and so this bug is
benign.
This commit is contained in:
Dmitri Tikhonov 2018-10-19 09:43:15 -04:00
parent 1e75f9380e
commit dee31d5649

View file

@ -159,7 +159,7 @@ lsquic_iquic_parse_packet_in_short_begin (lsquic_packet_in_t *packet_in,
{
memcpy(&packet_in->pi_conn_id, p, cid_len);
p += cid_len;
packet_in->pi_flags = PI_CONN_ID;
packet_in->pi_flags |= PI_CONN_ID;
}
/* We could read in the packet number here, but we choose to do it in