Skip to content

Commit 316bcc9

Browse files
committed
* FIX [mqtt_codec] Fix property STR copy leak
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
1 parent 4989696 commit 316bcc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/supplemental/mqtt/mqtt_codec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3738,7 +3738,7 @@ property_parse(struct pos_buf *buf, property *prop, uint8_t prop_id,
37383738
if (read_utf8_str(buf, &str) != 0)
37393739
log_warn("Property decode error: Not UTF-8!");
37403740
else
3741-
mqtt_buf_dup(&prop->data.p_value.binary, &str);
3741+
mqtt_buf_dup(&prop->data.p_value.str, &str);
37423742
} else {
37433743
read_utf8_str(buf, &prop->data.p_value.str);
37443744
}

0 commit comments

Comments
 (0)