summaryrefslogtreecommitdiff
path: root/src/lib/libc
diff options
context:
space:
mode:
authortb <>2022-03-26 16:34:21 +0000
committertb <>2022-03-26 16:34:21 +0000
commitac8744d51889c42d26769c65c226f6a4ab45da5e (patch)
treeb479f5e5efe3b6b03f82d771d623f8ae686fc6d0 /src/lib/libc
parentcb5a6c5bc2eacc54a81b940108d92c64bb97fed8 (diff)
downloadopenbsd-ac8744d51889c42d26769c65c226f6a4ab45da5e.tar.gz
openbsd-ac8744d51889c42d26769c65c226f6a4ab45da5e.tar.bz2
openbsd-ac8744d51889c42d26769c65c226f6a4ab45da5e.zip
name constraints: be more careful with NULs
An IA5STRING is a Pascal string that can have embedded NULs and is not NUL terminated (except that for legacy reasons it happens to be). Instead of taking the strlen(), use the already known ASN.1 length and use strndup() instead of strdup() to generate NUL terminated strings after some existing code has checked that there are no embedded NULs. In v2i_GENERAL_NAME_ex() use %.*s to print the bytes. This is not optimal and might be switched to using strvis() later. ok beck inoguchi jsing
Diffstat (limited to 'src/lib/libc')
0 files changed, 0 insertions, 0 deletions