aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/nat_static.hpp
diff options
context:
space:
mode:
authorGabriel Ganne <gabriel.ganne@enea.com>2017-10-24 09:58:45 +0200
committerDave Barach <openvpp@barachs.net>2017-11-01 10:06:19 +0000
commit53ae29e0608868be4f6a9cced21c39e72e294d0b (patch)
tree3bd13676023e9974231eb51e345a9ea6f8ef36fc /src/vpp-api/vom/nat_static.hpp
parent2e2a0ebf0b3b30a8e8d0e39de5b0fdc3b82ab14c (diff)
fix clib_mem_unaligned() invalid read
clib_mem_unaligned + zap64 casts its input as u64, computes a mask according to the input length, and returns the casted maked value. Therefore all the 8 Bytes of the u64 are systematically read, and the invalid ones are discarded. For example, for a 5-Bytes string, we will do an invalid read of size 3, even though those 3 Bytes are never used. This patch proposes to only read what we have at the cost of reading as a u64 in one call, but that way, we do not trigger an invalid read error. Change-Id: I3e0b31c4113d9c8e53aa5fa3d3d396ec80f06a27 Signed-off-by: Gabriel Ganne <gabriel.ganne@enea.com>
Diffstat (limited to 'src/vpp-api/vom/nat_static.hpp')
0 files changed, 0 insertions, 0 deletions