summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-04-29 18:39:12 -0300
committerLennart Poettering <lennart@poettering.net>2013-04-30 08:36:01 -0300
commitaa96c6cb44a6eeccc506ae055aae2519a7f914e1 (patch)
tree7ddc766397769008a014b1777661bbaf94311de8 /src/nspawn/nspawn.c
parent6886b0449dbf264f6b7db2a93a1cfee0e4d4080a (diff)
id128: when taking user input for a 128bit ID, validate syntax
Also, always accept both our simple hexdump syntax and UUID syntax.
Diffstat (limited to 'src/nspawn/nspawn.c')
-rw-r--r--src/nspawn/nspawn.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index a49cbc2238..0a46313636 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -222,6 +222,11 @@ static int parse_argv(int argc, char *argv[]) {
break;
case ARG_UUID:
+ if (!id128_is_valid(optarg)) {
+ log_error("Invalid UUID: %s", optarg);
+ return -EINVAL;
+ }
+
arg_uuid = optarg;
break;