diff options
author | miod <> | 2014-10-05 18:33:57 +0000 |
---|---|---|
committer | miod <> | 2014-10-05 18:33:57 +0000 |
commit | 49188c3cbd6d5b685ae672d1413d71756fcfe5ae (patch) | |
tree | df8d62c552e6e0a96c09d51f0420954c0bbad6ec /src/lib/libcrypto/objects/obj_lib.c | |
parent | 3a13a528b3c202483ccdd9d0a1bb30b5bb590858 (diff) | |
download | openbsd-49188c3cbd6d5b685ae672d1413d71756fcfe5ae.tar.gz openbsd-49188c3cbd6d5b685ae672d1413d71756fcfe5ae.tar.bz2 openbsd-49188c3cbd6d5b685ae672d1413d71756fcfe5ae.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/libcrypto/objects/obj_lib.c')
0 files changed, 0 insertions, 0 deletions