Skip to content

Commit a5d72fe

Browse files
drivers: can: shell: fully initialize frame before sending
Zerorise the CAN frame before filling in data to ensure all data bytes are initialized. Fixes: #73309 Signed-off-by: Henrik Brix Andersen <[email protected]> (cherry picked from commit fb4f67b)
1 parent 899e9e5 commit a5d72fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/can/can_shell.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ static int cmd_can_send(const struct shell *sh, size_t argc, char **argv)
676676
const struct device *dev = device_get_binding(argv[1]);
677677
static unsigned int frame_counter;
678678
unsigned int frame_no;
679-
struct can_frame frame;
679+
struct can_frame frame = { 0 };
680680
uint32_t max_id;
681681
int argidx = 2;
682682
uint32_t val;

0 commit comments

Comments
 (0)