Skip to content

Commit dbabbe1

Browse files
authored
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.
1 parent 559858c commit dbabbe1

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

ext/openssl/openssl.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -652,10 +652,6 @@ PHP_FUNCTION(openssl_spki_new)
652652
if (spki != NULL) {
653653
NETSCAPE_SPKI_free(spki);
654654
}
655-
656-
if (s && ZSTR_LEN(s) <= 0) {
657-
RETVAL_FALSE;
658-
}
659655
}
660656
/* }}} */
661657

0 commit comments

Comments
 (0)