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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user