[ovs-git] [openvswitch/ovs] 507a9a: learn: Avoid nested zero-sized arrays to fix build...

GitHub noreply at github.com
Thu Sep 1 20:30:16 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 507a9a169597fd8054aa2ae08e428dda2bd45583
      https://github.com/openvswitch/ovs/commit/507a9a169597fd8054aa2ae08e428dda2bd45583
  Author: Jarno Rajahalme <jarno at ovn.org>
  Date:   2016-09-01 (Thu, 01 Sep 2016)

  Changed paths:
    M include/openvswitch/ofp-actions.h
    M lib/learn.c
    M lib/ofp-actions.c

  Log Message:
  -----------
  learn: Avoid nested zero-sized arrays to fix build with MSVC.

Avoid using nested zero-sized arrays to allow compilation with MSVC.
Also, make sure the immediate data is accessed only if it exists, and
that the size is always calculated from struct learn_spec field
'n_bits'.

Fixes: dfe191d5faa6 ("ofp-actions: Waste less memory in learn actions.")
Reported-by: Alin Serdean <aserdean at cloudbasesolutions.com>
Signed-off-by: Jarno Rajahalme <jarno at ovn.org>
Acked-by: Ben Pfaff <blp at ovn.org>




More information about the git mailing list