acl-plugin: fix coverity error that the fix related for [VPP-1502] has triggered 49/16149/1
authorAndrew Yourtchenko <ayourtch@gmail.com>
Fri, 23 Nov 2018 08:22:10 +0000 (09:22 +0100)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Fri, 23 Nov 2018 14:06:30 +0000 (14:06 +0000)
commit277681ebfd5f7a6742490522239eeee575f21c71
tree6c9cb32efd72dd93b46064e770bc3c4ac03deee8
parent0858497cee6b80c0aaefb0ca8c2ac34111fddfe3
acl-plugin: fix coverity error that the fix related for [VPP-1502] has triggered

Fix the trivial use-before-check copypaste error.

There was a more subtle issue with that patch that Coverity didn't notice:
namely, vec_validate(v, len-1) is a terrible idea if len happens to be == 0.
Fix that.

Change-Id: I0fab8b1750e9e9973eefb5d39f35e4c3a13fc66f
Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
(cherry picked from commit e0152461cbc84d6d4df3f05dddabe992c1c59052)
src/plugins/acl/hash_lookup.c