mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-31 01:35:11 +02:00
upstream: do not leak oprincipals; ok djm
OpenBSD-Commit-ID: 4691d9387eab36f8fda48f5d8009756ed13a7c4c
This commit is contained in:
parent
8fae395f34
commit
5732d58020
6
sshsig.c
6
sshsig.c
@ -881,8 +881,10 @@ cert_filter_principals(const char *path, u_long linenum,
|
|||||||
oprincipals = principals = *principalsp;
|
oprincipals = principals = *principalsp;
|
||||||
*principalsp = NULL;
|
*principalsp = NULL;
|
||||||
|
|
||||||
if ((nprincipals = sshbuf_new()) == NULL)
|
if ((nprincipals = sshbuf_new()) == NULL) {
|
||||||
return SSH_ERR_ALLOC_FAIL;
|
r = SSH_ERR_ALLOC_FAIL;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
while ((cp = strsep(&principals, ",")) != NULL && *cp != '\0') {
|
while ((cp = strsep(&principals, ",")) != NULL && *cp != '\0') {
|
||||||
if (strcspn(cp, "!?*") != strlen(cp)) {
|
if (strcspn(cp, "!?*") != strlen(cp)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user