projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e7ade9
)
asn1/tasn_utl.c: fix logical error in asn1_do_lock.
author
Andy Polyakov
<appro@openssl.org>
Thu, 2 Aug 2018 07:02:47 +0000
(09:02 +0200)
committer
Andy Polyakov
<appro@openssl.org>
Fri, 3 Aug 2018 07:01:08 +0000
(09:01 +0200)
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
patch
|
blob
|
history
diff --git
a/crypto/asn1/tasn_utl.c
b/crypto/asn1/tasn_utl.c
index f79d7d6b447cf2ed5d3eb19ebbbfedcd0c8495f3..cad45a07f52dbf69f1654568ce01590d4c47032c 100644
(file)
--- a/
crypto/asn1/tasn_utl.c
+++ b/
crypto/asn1/tasn_utl.c
@@
-76,7
+76,7
@@
int asn1_do_lock(ASN1_VALUE **pval, int op, const ASN1_ITEM *it)
}
return 1;
}
- if (
CRYPTO_atomic_add(lck, op, &ret, *lock) < 0
)
+ if (
!CRYPTO_atomic_add(lck, op, &ret, *lock)
)
return -1; /* failed */
#ifdef REF_PRINT
fprintf(stderr, "%p:%4d:%s\n", it, *lck, it->sname);