From 0ca2e82ab1575f9c4eed259c4d66ca9372a45bf5 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Sat, 6 Feb 2016 17:07:58 +0000 Subject: [PATCH] if no comparison function set make sk_sort no op Reviewed-by: Rich Salz --- crypto/stack/stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/stack/stack.c b/crypto/stack/stack.c index 286f290c97..d486f335b2 100644 --- a/crypto/stack/stack.c +++ b/crypto/stack/stack.c @@ -336,7 +336,7 @@ void *sk_set(_STACK *st, int i, void *value) void sk_sort(_STACK *st) { - if (st && !st->sorted) { + if (st && !st->sorted && st->comp != NULL) { int (*comp_func) (const void *, const void *); /* -- 2.25.1