util: don't accept an empty peer label as valid
This commit is contained in:
parent
2dc9970bed
commit
ae98841e63
|
@ -6172,6 +6172,11 @@ int getpeersec(int fd, char **ret) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isempty(s)) {
|
||||||
|
free(s);
|
||||||
|
return -ENOTSUP;
|
||||||
|
}
|
||||||
|
|
||||||
*ret = s;
|
*ret = s;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue