The management_tlv_datum used in some SET commands is allocated
on stack, but nothing initialized the 8-bit reserved field. Set it to
zero to avoid sending uninitialized data.

Signed-off-by: Miroslav Lichvar <mlich...@redhat.com>
---
 pmc_common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pmc_common.c b/pmc_common.c
index be78914..1af94f1 100644
--- a/pmc_common.c
+++ b/pmc_common.c
@@ -155,6 +155,8 @@ static void do_set_action(struct pmc *pmc, int action, int 
index, char *str)
        char onoff_port_state[4] = "off";
        char onoff_time_status[4] = "off";
 
+       mtd.reserved = 0;
+
        switch (action) {
        case GET:
                pmc_send_get_action(pmc, code);
-- 
2.35.1



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to