aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/stack/stack.c
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2000-05-31 15:28:01 +0000
committerGeoff Thorpe <geoff@openssl.org>2000-05-31 15:28:01 +0000
commit01296a6de0f968d741d871efda8ab4ed5420442d (patch)
tree4f259b26953e62e2d63e6f411636800260e796cd /crypto/stack/stack.c
parent2ace287deaf64df6ccfd8e61ab4022207c66ec06 (diff)
downloadopenssl-01296a6de0f968d741d871efda8ab4ed5420442d.tar.gz
All the little functions created by the IMPLEMENT_STACK_OF() macro will
cast their type-specific STACK into a real STACK and call the underlying sk_*** function. The problem is that if the STACK_OF(..) parameter being passed in has a "const *" qualifier, it is discarded by the cast. I'm currently implementing a fix for this but in the mean-time, this is one case I noticed (a few type-specific sk_**_num() functions pass in const type-specific stacks). If there are other errors in the code where consts are being discarded, we will similarly not notice them. yuck.
Diffstat (limited to 'crypto/stack/stack.c')
-rw-r--r--crypto/stack/stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/stack/stack.c b/crypto/stack/stack.c
index 3e2f4d8786..8ab4302c2e 100644
--- a/crypto/stack/stack.c
+++ b/crypto/stack/stack.c
@@ -279,7 +279,7 @@ void sk_free(STACK *st)
Free(st);
}
-int sk_num(STACK *st)
+int sk_num(const STACK *st)
{
if(st == NULL) return -1;
return st->num;