From 8dac8942dcae2bb35212aa4ff5488bd8dcda1fad Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 2 Mar 2017 23:06:22 +0100 Subject: Fix: Make sure can_message_t.data_ member has been clear before use it again. Change-Id: Ib073d67651cd3272190ef7464e806cf1f22b4cf3 Signed-off-by: Romain Forlot --- src/can-message.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/can-message.cpp b/src/can-message.cpp index 39059430..5d01880b 100644 --- a/src/can-message.cpp +++ b/src/can-message.cpp @@ -152,6 +152,7 @@ void can_message_t::set_data(const __u8* new_data) { int i; + data_.clear(); /* maxdlen_ is now set at CAN_MAX_DLEN or CANFD_MAX_DLEN, respectively 8 and 64 bytes*/ for(i=0;i