summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib
diff options
context:
space:
mode:
authormiod <>2014-10-05 18:33:57 +0000
committermiod <>2014-10-05 18:33:57 +0000
commitb527ee699b18c10d3ada83b8042c79635259ec93 (patch)
treedf8d62c552e6e0a96c09d51f0420954c0bbad6ec /src/lib/libc/stdlib
parenta9b18c67c3d4198063412bac24c16c2ca15fb5e8 (diff)
downloadopenbsd-b527ee699b18c10d3ada83b8042c79635259ec93.tar.gz
openbsd-b527ee699b18c10d3ada83b8042c79635259ec93.tar.bz2
openbsd-b527ee699b18c10d3ada83b8042c79635259ec93.zip
The fixes to X509_PURPOSE_add() in r1.18 actually could cause a global
X509_PURPOSE object (obtained with X509_PURPOSE_get0() instead of being allocated in the function) to be freed if modifying that object would fail due to a low memory condition, while this object would still be referenced elsewhere. Fix this by only cleaning the object if we did not allocate it here. While there, fail early if either `name' or `sname' are NULL, rather than allocating an object and realizing we have nothing to strdup() into it. ok guenther@
Diffstat (limited to 'src/lib/libc/stdlib')
0 files changed, 0 insertions, 0 deletions