asn1/tasn_utl.c: fix logical error in asn1_do_lock.
authorAndy Polyakov <appro@openssl.org>
Thu, 2 Aug 2018 07:02:47 +0000 (09:02 +0200)
committerAndy Polyakov <appro@openssl.org>
Fri, 3 Aug 2018 07:01:08 +0000 (09:01 +0200)
commitc700d1fe090acf3661d3948c25f489803f50a98b
tree0a141bbedb72a535caa0fd3390f5b17e79438336
parent4e7ade969944a9e6923a48471efb910dfb5f4a3a
asn1/tasn_utl.c: fix logical error in asn1_do_lock.

CRYPTO_atomic_add was assumed to return negative value on error, while
it returns 0.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/6843)
crypto/asn1/tasn_utl.c