diff options
author | Steven Luong <sluong@cisco.com> | 2020-02-25 11:06:17 -0800 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-02-25 22:36:54 +0000 |
commit | 2da39718f560478678caacccd198ee4c0c9673c3 (patch) | |
tree | 7c91d399c73ae8924dccbfb4b70228f1372bbf1f /src/plugins/cdp/cdp_test.c | |
parent | 2de9c0f92bb486072d8371a24d9b23fd85e1aa80 (diff) |
unittest: Skip string test case for sizeof (src) > sizeof (dst)
coverity complains that the subject test may cause dst buffer overrun
problem and it is right. The problem is when __builtin_constant_p (n)
returns true, memcpy_s_inline skips all the errors checking and does the
copy blindly. Please see the code in memcpy_s_inline.
The fix is to skip the subject test when the aformentioned builtin function
returns true.
Type: fix
Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I50de91cc0c853a134b3bcf3b0cd8d45d7668b092
Diffstat (limited to 'src/plugins/cdp/cdp_test.c')
0 files changed, 0 insertions, 0 deletions