提交 a36c5eab 编写于 作者: M Matt Caswell

Sanity check an ASN1_object_size result

If it's negative don't try and malloc it.
Reviewed-by: NTim Hudson <tjh@openssl.org>
上级 b197257d
......@@ -373,6 +373,8 @@ ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name)
}
/* Work out total size */
j = ASN1_object_size(0, i, V_ASN1_OBJECT);
if (j < 0)
return NULL;
if ((buf = OPENSSL_malloc(j)) == NULL)
return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册