]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.11] crypto/x509: fix value ownership in isSSLPolicy on macOS
authorFilippo Valsorda <filippo@golang.org>
Tue, 21 May 2019 18:54:54 +0000 (14:54 -0400)
committerDmitri Shuralyov <dmitshur@golang.org>
Fri, 7 Jun 2019 20:50:08 +0000 (20:50 +0000)
commitd497d80d23bf83765316b274885257ac66d54bb7
tree16a989a3e4d977d76efe46d5321b4bf83b45d8e0
parentefa061d9f5d52846dfc3dda40eaf8eccfeeae8d2
[release-branch.go1.11] crypto/x509: fix value ownership in isSSLPolicy on macOS

CFDictionaryGetValueIfPresent does not take ownership of the value, so
releasing the properties dictionary before passing the value to CFEqual
can crash. Not really clear why this works most of the time.

See https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html

Fixes #32281
Updates #28092
Updates #30763

Change-Id: I5ee7ca276b753a48abc3aedfb78b8af68b448dd4
Reviewed-on: https://go-review.googlesource.com/c/go/+/178537
Reviewed-by: Adam Langley <agl@golang.org>
(cherry picked from commit a3d4655c2435e3777c45f09650539b943bab1c66)
Reviewed-on: https://go-review.googlesource.com/c/go/+/179340
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
src/crypto/x509/root_cgo_darwin.go