asn1/tasn_utl.c: fix logical error in and overhaul asn1_do_lock.
authorAndy Polyakov <appro@openssl.org>
Tue, 31 Jul 2018 12:59:14 +0000 (14:59 +0200)
committerAndy Polyakov <appro@openssl.org>
Wed, 1 Aug 2018 14:09:25 +0000 (16:09 +0200)
commit24233a0f3c491919ee3a38e2567271ccc041ee1d
tree26f33073161fc843d2e0772bd7d93405a13e4c77
parentc0cc23af26d0363dbd164ceae97ed044e3fd8861
asn1/tasn_utl.c: fix logical error in and overhaul asn1_do_lock.

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

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 680b9d45b005c2d0a48fd574db903bf4486b49ae)
crypto/asn1/tasn_utl.c