Unchecked return value
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
static bool restore_net_info(struct lxc_container *c)
{
+ int ret;
struct lxc_list *it;
bool has_error = true;
if (netdev->type != LXC_NET_VETH)
continue;
- snprintf(template, sizeof(template), "vethXXXXXX");
+ ret = snprintf(template, sizeof(template), "vethXXXXXX");
+ if (ret < 0 || ret >= sizeof(template))
+ goto out_unlock;
if (netdev->priv.veth_attr.pair[0] == '\0' &&
netdev->priv.veth_attr.veth1[0] == '\0') {