MQTT parse_publish_vhdr: added missing initialization of topic_pos

This commit is contained in:
Simon Duquennoy 2018-10-15 14:11:59 +02:00
parent 0039fde747
commit 3b5369cf2a
1 changed files with 1 additions and 0 deletions

View File

@ -872,6 +872,7 @@ parse_publish_vhdr(struct mqtt_connection *conn,
/* Read out topic length */
if(conn->in_packet.topic_len_received == 0) {
conn->in_packet.topic_pos = 0;
conn->in_packet.topic_len = (input_data_ptr[(*pos)++] << 8);
conn->in_packet.byte_counter++;
if(*pos >= input_data_len) {