summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/strmode.c
diff options
context:
space:
mode:
authortb <>2024-06-18 05:32:38 +0000
committertb <>2024-06-18 05:32:38 +0000
commitcb1399be72dc293bd666a7a28faac9d470eefa82 (patch)
tree76cd4d373248a7c18241adc4cbe3ab572ed6fb1a /src/lib/libc/string/strmode.c
parent578bd6f0d992036c8ea58704e774ba3e6c585c34 (diff)
downloadopenbsd-cb1399be72dc293bd666a7a28faac9d470eefa82.tar.gz
openbsd-cb1399be72dc293bd666a7a28faac9d470eefa82.tar.bz2
openbsd-cb1399be72dc293bd666a7a28faac9d470eefa82.zip
do_ext_i2d(): avoid leaks and add some missing error checking
If ASN1_OCTET_STRING_new() failed, ext_der would be leaked, fix this. If i2d(foo, NULL) succeeded, the same is not guaranteed for the second with appropriately sized buffer since i2d() may make further allocations internally. So use the proper error check. Also transfer the ownership of ext_der to the octet string to avoid a now possible double free. ok jsing
Diffstat (limited to 'src/lib/libc/string/strmode.c')
0 files changed, 0 insertions, 0 deletions