From dc6d29371fb0372db2ebce025f50e37b6c1d7f00 Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 27 Jul 2017 03:17:42 +0000 Subject: [PATCH] Avoid a crash when no compressors are listed. Closes #945 --- scripts/ssl-enum-ciphers.nse | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/ssl-enum-ciphers.nse b/scripts/ssl-enum-ciphers.nse index 8bb99ed5f..fba2003ab 100644 --- a/scripts/ssl-enum-ciphers.nse +++ b/scripts/ssl-enum-ciphers.nse @@ -1043,7 +1043,9 @@ local function try_protocol(host, port, protocol, upresults) results["ciphers"] = ciphers -- Format the compressor table. - table.sort(compressors) + if compressors then + table.sort(compressors) + end results["compressors"] = compressors results["cipher preference"] = cipher_pref