From 402fb1896b2aab5cf887127bbce964554b9c8113 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 (cherry picked from commit 0ca2e82ab1575f9c4eed259c4d66ca9372a45bf5) --- 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 de437acf6a..fa50083e22 100644 --- a/crypto/stack/stack.c +++ b/crypto/stack/stack.c @@ -360,7 +360,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