提交 297c1149 编写于 作者: M Matt Caswell

Remove OPENSSL_assert() from crypto/asn1/bio_asn1.c

Reviewed-by: NAndy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3740)
上级 045fe731
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <string.h> #include <string.h>
#include <internal/bio.h> #include <internal/bio.h>
#include <openssl/asn1.h> #include <openssl/asn1.h>
#include "internal/cryptlib.h"
/* Must be large enough for biggest tag+length */ /* Must be large enough for biggest tag+length */
#define DEFAULT_ASN1_BUF_SIZE 20 #define DEFAULT_ASN1_BUF_SIZE 20
...@@ -181,7 +182,8 @@ static int asn1_bio_write(BIO *b, const char *in, int inl) ...@@ -181,7 +182,8 @@ static int asn1_bio_write(BIO *b, const char *in, int inl)
case ASN1_STATE_HEADER: case ASN1_STATE_HEADER:
ctx->buflen = ASN1_object_size(0, inl, ctx->asn1_tag) - inl; ctx->buflen = ASN1_object_size(0, inl, ctx->asn1_tag) - inl;
OPENSSL_assert(ctx->buflen <= ctx->bufsize); if (!ossl_assert(ctx->buflen <= ctx->bufsize))
return 0;
p = ctx->buf; p = ctx->buf;
ASN1_put_object(&p, 0, inl, ctx->asn1_tag, ctx->asn1_class); ASN1_put_object(&p, 0, inl, ctx->asn1_tag, ctx->asn1_class);
ctx->copylen = inl; ctx->copylen = inl;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册