X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffstools.git;a=blobdiff_plain;f=block.c;h=4c8dda92fefac06d2a515564bb8ed5c4f67536b3;hp=aecf36669c5c3b38db6d4a4a78c842a13d291371;hb=cf8056385c287b98c70376034f0bfc59cc9261ed;hpb=cc526b9dd7471270dae586433ec610760df54cc0 diff --git a/block.c b/block.c index aecf366..4c8dda9 100644 --- a/block.c +++ b/block.c @@ -274,6 +274,13 @@ static int mount_add(struct uci_section *s) if (m->target && !strcmp(m->target, "/overlay")) m->extroot = m->overlay = 1; + if (m->target && *m->target != '/') { + ULOG_WARN("ignoring mount section %s due to invalid target '%s'\n", + s->e.name, m->target); + free(m); + return -1; + } + if (m->uuid) vlist_add(&mounts, &m->node, m->uuid); else if (m->label)