summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/random.c
diff options
context:
space:
mode:
authorjsing <>2023-05-28 10:34:17 +0000
committerjsing <>2023-05-28 10:34:17 +0000
commit578b48e18ec5c4e20edc1ad347212eca5c581b15 (patch)
tree63ba3aab3d0858fe20ca0250c3e68fb563dd2ea0 /src/lib/libc/stdlib/random.c
parentea823a8cf769df23c0d5d8896e76dea119ebbbe8 (diff)
downloadopenbsd-578b48e18ec5c4e20edc1ad347212eca5c581b15.tar.gz
openbsd-578b48e18ec5c4e20edc1ad347212eca5c581b15.tar.bz2
openbsd-578b48e18ec5c4e20edc1ad347212eca5c581b15.zip
Rewrite BN_{asc,dec,hex}2bn() using CBS.
This gives us more readable and safer code. There are two intentional changes to behaviour - firstly, all three functions zero any BN that was passed in, prior to doing any further processing. This means that a passed BN is always in a known state, regardless of what happens later. Secondly, BN_asc2bn() now fails on NULL input, rather than crashing. This brings its behaviour inline with BN_dec2bn() and BN_hex2bn(). ok tb@
Diffstat (limited to 'src/lib/libc/stdlib/random.c')
0 files changed, 0 insertions, 0 deletions