summaryrefslogtreecommitdiff
path: root/lib/libocurses/refresh.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-07-12 16:42:48 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-07-12 16:42:48 +0000
commit5efd2bf1e892940ced2a58412c0c4e008fc7b02f (patch)
treec92ea42dfe23a6c6c9d9c4471776249737d49ece /lib/libocurses/refresh.c
parentc46b32b6d1351dc2a3a1aa5626abeec08d732d4f (diff)
A few fixes/improvements:
- first, BN_free == BN_clear_free in our libcrypto, so we do not need to treat CBIGNUM (crypto BN) separately from BIGNUM (regular BN). - then, in bn_i2c(), since BN_bn2bin returns BN_num_bytes(input), take advantage of this to avoid calling BN_num_bytes() a second time. BN_num_bytes() is cheap, but this not a reason to perform redundant work. - finally, in bn_c2i, if bn_new() fails, return early. Otherwise BN_bin2bn will try to create a BN too, and although this will probably fail since we were already out of memory, if we are on a threaded process and suddenly the allocation succeeds, we will leak it since it will never be stored in *pval. ok jsing@
Diffstat (limited to 'lib/libocurses/refresh.c')
0 files changed, 0 insertions, 0 deletions