]> git.ipfire.org Git - thirdparty/curl.git/commit
sectransp: fix EXC_BAD_ACCESS caused by uninitialized buffer
authorejanchivdorj <ejanchivdorj@tableau.com>
Tue, 25 May 2021 06:38:17 +0000 (23:38 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 25 May 2021 09:22:09 +0000 (11:22 +0200)
commita63dae5d078b24dc441e421a37fa7daf09fc4768
tree8c84b13ed586c601471c54c47cdbadf6bf1edff0
parent643ec296456ba98c536857fce3ecfd021d44d913
sectransp: fix EXC_BAD_ACCESS caused by uninitialized buffer

When the SecCertificateCopyCommonName function fails, it leaves
common_name in a invalid state so CFStringCompare uses the invalid
result, causing EXC_BAD_ACCESS.

The fix is to check the return value of the function before using the
name.

Closes #7126
lib/vtls/sectransp.c