]> Cypherpunks repositories - gostls13.git/commit
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)
committerFilippo Valsorda <filippo@golang.org>
Wed, 22 May 2019 16:12:45 +0000 (16:12 +0000)
commita3d4655c2435e3777c45f09650539b943bab1c66
tree5f87333a93a37af0e148dc9278ca486b28d81144
parent06b0babf3138d189f6e741561f77ac6146696377
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 #28092
Hopefully fixes #30763

Change-Id: I5ee7ca276b753a48abc3aedfb78b8af68b448dd4
Reviewed-on: https://go-review.googlesource.com/c/go/+/178537
Reviewed-by: Adam Langley <agl@golang.org>
src/crypto/x509/root_cgo_darwin.go