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

Merge branch 'PHP-8.4'

* PHP-8.4:
  Fix potential leaks when writing to BIO fails
This commit is contained in:
Niels Dossche
2025-04-11 21:04:24 +02:00

View File

@@ -2752,8 +2752,8 @@ PHP_FUNCTION(openssl_pkcs7_read)
BIO_get_mem_ptr(bio_out, &bio_buf);
ZVAL_STRINGL(&zcert, bio_buf->data, bio_buf->length);
add_index_zval(zout, i, &zcert);
BIO_free(bio_out);
}
BIO_free(bio_out);
}
}
@@ -2767,8 +2767,8 @@ PHP_FUNCTION(openssl_pkcs7_read)
BIO_get_mem_ptr(bio_out, &bio_buf);
ZVAL_STRINGL(&zcert, bio_buf->data, bio_buf->length);
add_index_zval(zout, i, &zcert);
BIO_free(bio_out);
}
BIO_free(bio_out);
}
}
@@ -3393,8 +3393,8 @@ PHP_FUNCTION(openssl_cms_read)
BIO_get_mem_ptr(bio_out, &bio_buf);
ZVAL_STRINGL(&zcert, bio_buf->data, bio_buf->length);
add_index_zval(zout, i, &zcert);
BIO_free(bio_out);
}
BIO_free(bio_out);
}
}
@@ -3408,8 +3408,8 @@ PHP_FUNCTION(openssl_cms_read)
BIO_get_mem_ptr(bio_out, &bio_buf);
ZVAL_STRINGL(&zcert, bio_buf->data, bio_buf->length);
add_index_zval(zout, i, &zcert);
BIO_free(bio_out);
}
BIO_free(bio_out);
}
}