conf/ile: use lxc_safe_uint() in config_tty()

parent 226dc30e
...@@ -293,7 +293,7 @@ struct saved_nic { ...@@ -293,7 +293,7 @@ struct saved_nic {
struct lxc_conf { struct lxc_conf {
int is_execute; int is_execute;
char *fstab; char *fstab;
int tty; unsigned int tty;
unsigned int pts; unsigned int pts;
int reboot; int reboot;
int need_utmp_watch; int need_utmp_watch;
......
...@@ -1260,9 +1260,8 @@ freak_out: ...@@ -1260,9 +1260,8 @@ freak_out:
static int config_tty(const char *key, const char *value, static int config_tty(const char *key, const char *value,
struct lxc_conf *lxc_conf) struct lxc_conf *lxc_conf)
{ {
int nbtty = atoi(value); if (lxc_safe_uint(value, &lxc_conf->tty) < 0)
return -1;
lxc_conf->tty = nbtty;
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment