2
0
mirror of git://github.com/lxc/lxc synced 2025-08-31 06:45:14 +00:00

Merge pull request #934 from GreatFruitOmsk/master

Fix buffer overflow in do_start()
This commit is contained in:
Christian Brauner
2016-03-31 12:56:11 +02:00

View File

@@ -790,7 +790,7 @@ static int do_start(void *data)
}
#endif
ret = sprintf(path, "%s/dev/null", handler->conf->rootfs.mount);
ret = snprintf(path, sizeof(path), "%s/dev/null", handler->conf->rootfs.mount);
if (ret < 0 || ret >= sizeof(path)) {
SYSERROR("sprintf'd too many chars");
goto out_warn_father;