diff options
author | Dave Barach <dave@barachs.net> | 2018-12-05 08:41:11 -0500 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2018-12-05 19:07:26 +0000 |
commit | d08ae85ee42d1914e60bd2566c533db6ec3e3598 (patch) | |
tree | 7b79899f7e7f31c56c7d2a6dbc60ff2bda6fc2aa /src/vppinfra/flowhash_template.h | |
parent | eaec2a6d9ab8b983aaee536be1a95846c07a9d7f (diff) |
Improve strncpy_s src/dst overlap check
Let m = user estimate of the (max) src string length, low = smaller
address of (src, dst), hi = larger address (src, dst).
if (low + (m - 1) >= hi), we have a *potential* overlapping copy which
is not allowed. Before we declare overlap - and return an error -
retry the check with m = actual src string length.
The resulting "test string" failure affected aarch64 (only) because of
differences in test code stack variable placement / alignment.
Change-Id: I2931d1ce2c61af3d3880075b033d2a4c4e421f09
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vppinfra/flowhash_template.h')
0 files changed, 0 insertions, 0 deletions