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

parent 3590152f
......@@ -350,7 +350,7 @@ struct lxc_conf {
int nbd_idx;
/* unshare the mount namespace in the monitor */
int monitor_unshare;
unsigned int monitor_unshare;
/* set to true when rootfs has been setup */
bool rootfs_setup;
......
......@@ -1176,7 +1176,8 @@ static int config_monitor(const char *key, const char *value,
struct lxc_conf *lxc_conf)
{
if(strcmp(key, "lxc.monitor.unshare") == 0) {
lxc_conf->monitor_unshare = atoi(value);
if (lxc_safe_uint(value, &lxc_conf->monitor_unshare) < 0)
return -1;
return 0;
}
SYSERROR("Unknown key: %s", key);
......
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