The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1749
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === We shouldn't ignore this anyway. Signed-off-by: Christian Brauner <[email protected]>
From 24fdb3f00807683a553225921b0c4d8f23c274e0 Mon Sep 17 00:00:00 2001 From: Christian Brauner <[email protected]> Date: Wed, 16 Aug 2017 00:34:23 +0200 Subject: [PATCH] bdev: enable building with gcc7 We shouldn't ignore this anyway. Signed-off-by: Christian Brauner <[email protected]> --- src/lxc/bdev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c index 1f1fd66a6..73b682f4c 100644 --- a/src/lxc/bdev.c +++ b/src/lxc/bdev.c @@ -1930,7 +1930,11 @@ static int find_free_loopdev_no_control(int *retfd, char *namep) continue; } // We can use this fd - snprintf(namep, 100, "/dev/%s", direntp->d_name); + ret = snprintf(namep, 100, "/dev/%s", direntp->d_name); + if (ret < 0 || ret >= 100) { + close(fd); + fd = -1; + } break; } closedir(dir);
_______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
