diff options
author | tb <> | 2023-05-23 11:04:04 +0000 |
---|---|---|
committer | tb <> | 2023-05-23 11:04:04 +0000 |
commit | 5672c2cf8adbc84eb1793f1ee0a0ca8ef9a966f0 (patch) | |
tree | bda34ebac67612393f45df71186ae432cecdddae /src/lib/libc/stdlib/hcreate.c | |
parent | 89a2d57793321cb7f9e167c0bb6a6295adfd3419 (diff) | |
download | openbsd-5672c2cf8adbc84eb1793f1ee0a0ca8ef9a966f0.tar.gz openbsd-5672c2cf8adbc84eb1793f1ee0a0ca8ef9a966f0.tar.bz2 openbsd-5672c2cf8adbc84eb1793f1ee0a0ca8ef9a966f0.zip |
Always NUL terminate buf in OBJ_obj2txt()
OBJ_obj2txt() is often called without error checking and is used for
reporting unexpected or malformed objects. As such, we should ensure
buf is a string even on failure. This had long been the case before it
was lost in a recent rewrite. If obj and obj->data are both non-NULL
this is already taken care of by i2t_ASN1_OBJECT_internal(), so many
callers were still safe.
ok miod
Diffstat (limited to 'src/lib/libc/stdlib/hcreate.c')
0 files changed, 0 insertions, 0 deletions