From c4dfd9626b46d9a91d9aab30b82a8e4080354933 Mon Sep 17 00:00:00 2001 From: Chris Gavin Date: Sun, 7 May 2017 11:04:12 +0100 Subject: [PATCH] GUACAMOLE-295: Fix an incorrect comparison with NaN. --- guacamole-common-js/src/main/webapp/modules/Parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guacamole-common-js/src/main/webapp/modules/Parser.js b/guacamole-common-js/src/main/webapp/modules/Parser.js index 2be6fedd5..0f6066e24 100644 --- a/guacamole-common-js/src/main/webapp/modules/Parser.js +++ b/guacamole-common-js/src/main/webapp/modules/Parser.js @@ -121,7 +121,7 @@ Guacamole.Parser = function() { // Parse length var length = parseInt(buffer.substring(element_end+1, length_end)); - if (length == NaN) + if (isNaN(length)) throw new Error("Non-numeric character in element length."); // Calculate start of element