mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 08:05:20 +00:00
conf/ile: use lxc_safe_uint() in config_tty()
Signed-off-by: Christian Brauner <christian.brauner@canonical.com>
This commit is contained in:
parent
226dc30e4f
commit
1c30b4adbd
@ -293,7 +293,7 @@ struct saved_nic {
|
||||
struct lxc_conf {
|
||||
int is_execute;
|
||||
char *fstab;
|
||||
int tty;
|
||||
unsigned int tty;
|
||||
unsigned int pts;
|
||||
int reboot;
|
||||
int need_utmp_watch;
|
||||
|
@ -1260,9 +1260,8 @@ freak_out:
|
||||
static int config_tty(const char *key, const char *value,
|
||||
struct lxc_conf *lxc_conf)
|
||||
{
|
||||
int nbtty = atoi(value);
|
||||
|
||||
lxc_conf->tty = nbtty;
|
||||
if (lxc_safe_uint(value, &lxc_conf->tty) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user