Skip to content

Commit 045dbe9

Browse files
chaudronigsilya
authored andcommitted
dpif_netdev: Fix nullable memcpy in queue_netdev_flow_put().
The probe functions try to install a flow without any actions. For some reason, this only triggers an undefined behavior error after the next patch in this series. Fixes: 02bb282 ("dpif-netdev: do hw flow offload in a thread") Acked-by: Eli Britstein <elibr@nvidia.com> Acked-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
1 parent bcbe2fd commit 045dbe9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/dpif-netdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3084,7 +3084,7 @@ queue_netdev_flow_put(struct dp_netdev_pmd_thread *pmd,
30843084
flow_offload = &item->data->flow;
30853085
flow_offload->match = *match;
30863086
flow_offload->actions = xmalloc(actions_len);
3087-
memcpy(flow_offload->actions, actions, actions_len);
3087+
nullable_memcpy(flow_offload->actions, actions, actions_len);
30883088
flow_offload->actions_len = actions_len;
30893089
flow_offload->orig_in_port = flow->orig_in_port;
30903090

0 commit comments

Comments
 (0)