[ovs-git] [openvswitch/ovs] e95441: test-cmap: Avoid shift by full width of type in fi...

GitHub noreply at github.com
Fri Jun 2 03:59:35 UTC 2017

  Branch: refs/heads/branch-2.7
  Home:   https://github.com/openvswitch/ovs
  Commit: e954419426b0b9db3683c9bed927979559b0d37c
  Author: Ben Pfaff <blp at ovn.org>
  Date:   2017-06-01 (Thu, 01 Jun 2017)

  Changed paths:
    M tests/test-cmap.c

  Log Message:
  test-cmap: Avoid shift by full width of type in find_batch().

In C, it is undefined to shift an N-bit value by N.  This fixes the
problem in find_batch() for the case where i == 0.

Found by Coverity.

Reported-at: https://scan3.coverity.com/reports.htm#v16889/p10449/fileInstanceId=14763098&defectInstanceId=4304031&mergedDefectId=68209
Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Justin Pettit <jpettit at ovn.org>

More information about the git mailing list