subst_VEID(): make coverity happy
Coverity points out that we go out of bounds in case len == sizeof(str).
Indeed, in that case sp = str + len and it points to after the end of str.
This is a bogus warning because in this case the second snprintf
argument, se - sp, is 0, so it won't print anything.
Nevertheless it doesn't harm to change the if to satisfy coverity
and return an error a little bit earlier.
Reported by coverity, CID 996838.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed