util: don't accept an empty peer label as valid

This commit is contained in:
Lennart Poettering 2013-12-24 16:21:59 +01:00
parent 2dc9970bed
commit ae98841e63
1 changed files with 5 additions and 0 deletions

View File

@ -6172,6 +6172,11 @@ int getpeersec(int fd, char **ret) {
}
}
if (isempty(s)) {
free(s);
return -ENOTSUP;
}
*ret = s;
return 0;
}