Stack sorting safety
authorPauli <paul.dale@oracle.com>
Mon, 18 Sep 2017 02:17:18 +0000 (12:17 +1000)
committerPauli <paul.dale@oracle.com>
Mon, 18 Sep 2017 02:17:18 +0000 (12:17 +1000)
Use the defined typechecking stack method to sort the compression methods stack
rather than using the generic function and apply type casts.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4382)

fuzz/client.c
fuzz/server.c

index 1f4a41123b970c1f80db03d37eb3712f1d04b9e1..ce6d8cc85e16fe442824765fa0554a164373e6ff 100644 (file)
@@ -49,7 +49,7 @@ int FuzzerInitialize(int *argc, char ***argv)
     idx = SSL_get_ex_data_X509_STORE_CTX_idx();
     FuzzerSetRand();
     comp_methods = SSL_COMP_get_compression_methods();
-    OPENSSL_sk_sort((OPENSSL_STACK *)comp_methods);
+    sk_SSL_COMP_sort(comp_methods);
 
 
     return 1;
index e51ce10969ac2ebff3bda5ed454af668cea96fa6..c31cf7ff2f0979b0df7a2dbe1bffce0ee4946a58 100644 (file)
@@ -496,7 +496,7 @@ int FuzzerInitialize(int *argc, char ***argv)
     idx = SSL_get_ex_data_X509_STORE_CTX_idx();
     FuzzerSetRand();
     comp_methods = SSL_COMP_get_compression_methods();
-    OPENSSL_sk_sort((OPENSSL_STACK *)comp_methods);
+    sk_SSL_COMP_sort(comp_methods);
 
 
     return 1;