diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-27 04:56:02 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-27 04:56:02 +0100 |
commit | 48e11fe8805bf1fcaa9d6231a037eed9cc931a62 (patch) | |
tree | 91e463fe11e9513bacc7d9bb480170bf423f5b2e | |
parent | b78d0be16db0e28371dd4045b502e28db9d6c78f (diff) |
don't allow zero length unit names
-rw-r--r-- | unit.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -62,6 +62,9 @@ bool unit_name_is_valid(const char *n) { if (!(e = strrchr(n, '.'))) return false; + if (e == n) + return false; + for (i = n; i < e; i++) if (!strchr(VALID_CHARS, *i)) return false; |