From: Dr. Stephen Henson Date: Sat, 6 Feb 2016 17:07:58 +0000 (+0000) Subject: if no comparison function set make sk_sort no op X-Git-Tag: OpenSSL_1_1_0-pre3~225 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0ca2e82ab1575f9c4eed259c4d66ca9372a45bf5;p=oweals%2Fopenssl.git if no comparison function set make sk_sort no op Reviewed-by: Rich Salz --- 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 *); /*