1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Remove dead code from openssl_spki_new() implementation (#18752)

If s is not NULL, the length can't be <= 0 because we at least append
`spkac` in the string, which is non-empty.
I noticed this condition because if it were actually possible to
execute, then it would leak memory.
This commit is contained in:
Niels Dossche
2025-06-10 22:35:56 +02:00
committed by GitHub
parent 559858c822
commit dbabbe180b

View File

@@ -652,10 +652,6 @@ cleanup:
if (spki != NULL) {
NETSCAPE_SPKI_free(spki);
}
if (s && ZSTR_LEN(s) <= 0) {
RETVAL_FALSE;
}
}
/* }}} */