提交 4e0e4d29 编写于 作者: F FdaSilvaYY 提交者: Richard Levitte

Fix some missing OBJ_dup failure checks.

Fix some missing OBJ_dup failure checks.
Merged from
https://boringssl.googlesource.com/boringssl/+/0ce78a757d815c0dde9ed5884229f3a5b2cb3e9c%5E!
Reviewed-by: NKurt Roeckx <kurt@openssl.org>
Reviewed-by: NRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1057)
上级 e073fd15
......@@ -288,7 +288,7 @@ int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj)
return (0);
ASN1_OBJECT_free(attr->object);
attr->object = OBJ_dup(obj);
return (1);
return attr->object != NULL;
}
int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype,
......
......@@ -235,7 +235,7 @@ int X509_EXTENSION_set_object(X509_EXTENSION *ex, ASN1_OBJECT *obj)
return (0);
ASN1_OBJECT_free(ex->object);
ex->object = OBJ_dup(obj);
return (1);
return ex->object != NULL;
}
int X509_EXTENSION_set_critical(X509_EXTENSION *ex, int crit)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册