提交 c9b820aa 编写于 作者: K Kazuki Yamaguchi

Fix BN_print()

Fix a typo made in commit 27c6d63d (#4202).
Reviewed-by: NRich Salz <rsalz@openssl.org>
Reviewed-by: NRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4235)
上级 9d951a78
......@@ -313,7 +313,7 @@ int BN_print(BIO *bp, const BIGNUM *a)
for (i = a->top - 1; i >= 0; i--) {
for (j = BN_BITS2 - 4; j >= 0; j -= 4) {
/* strip leading zeros */
v = (int)((a->d[i] >> j) & 0xff);
v = (int)((a->d[i] >> j) & 0x0f);
if (z || v != 0) {
if (BIO_write(bp, &Hex[v], 1) != 1)
goto end;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册