aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2001-01-28 14:20:13 +0000
committerDr. Stephen Henson <steve@openssl.org>2001-01-28 14:20:13 +0000
commitb847024026c4e16371bf05adc4a9d88500472336 (patch)
tree1c4264b641bd10a39fc388040c6ed41eae4c1292
parent50d5199120d2d669039e75c17499483aa7607430 (diff)
downloadopenssl-b847024026c4e16371bf05adc4a9d88500472336.tar.gz
Make sk_sort tolearate a NULL argument.
-rw-r--r--CHANGES3
-rw-r--r--crypto/stack/stack.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 4665120efd..3a0d678ed5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,9 @@
Changes between 0.9.6 and 0.9.7 [xx XXX 2000]
+ *) Make sk_sort() tolerate a NULL argument.
+ [Steve Henson reported by Massimiliano Pala <madwolf@comune.modena.it>]
+
*) New OCSP verify flag OCSP_TRUSTOTHER. When set the "other" certificates
passed by the function are trusted implicitly. If any of them signed the
reponse then it is assumed to be valid and is not verified.
diff --git a/crypto/stack/stack.c b/crypto/stack/stack.c
index 02857f0446..9a75e433d7 100644
--- a/crypto/stack/stack.c
+++ b/crypto/stack/stack.c
@@ -316,7 +316,7 @@ char *sk_set(STACK *st, int i, char *value)
void sk_sort(STACK *st)
{
- if (!st->sorted)
+ if (st && !st->sorted)
{
int (*comp_func)(const void *,const void *);