]> git.proxmox.com Git - mirror_ovs.git/commit
odp-util: Fix a bug in parse_odp_push_nsh_action
authorYifeng Sun <pkusunyifeng@gmail.com>
Thu, 17 Jan 2019 18:22:12 +0000 (10:22 -0800)
committerBen Pfaff <blp@ovn.org>
Fri, 18 Jan 2019 00:35:11 +0000 (16:35 -0800)
commit2e38f13d70a9c049497a8cab681fe7b1f443c8b1
treec06416a9db35f7a683bedcc3efa0ded219da19c8
parentc3a08624975cf42489e8e1710babccc8d0569c85
odp-util: Fix a bug in parse_odp_push_nsh_action

In this piece of code, 'struct ofpbuf b' should always point to
metadata so that metadata can be filled with values through ofpbuf
operations, like ofpbuf_put_hex and ofpbuf_push_zeros. However,
ofpbuf_push_zeros may change the data pointer of 'struct ofpbuf b'
and therefore, metadata will not contain the expected values.

This patch fixes it by changing ofpbuf_push_zeros to
ofpbuf_put_zeros.

Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10863
Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/odp-util.c