load_ploop_lib(): prevent buffer overflow

vzctl can be compiled with an old version of ploop library headers,
so size of struct ploop_functions might be smaller than the one of
the currently installed library, causing a buffer overflow in
ploop_resolve_functions() leading to all sorts of funny effects.

While it's indeed an issue with ploop_resolve_functions() design,
let's workaround it here by providing a safety bag.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed