lxcapi_get_interfaces and lxcapi_get_ips: stricter read check

Coverity warns of the danger of a short read otherwise.

(Untested, but should be correct; Tossing over to you :)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Cc: S.Çağlar Onur <caglar@10ur.org>
Acked-by: S.Çağlar Onur <caglar@10ur.org>