summaryrefslogtreecommitdiff
path: root/src/node_crypto_clienthello.h
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2016-06-30 03:42:54 -0400
committerFedor Indutny <fedor@indutny.com>2016-07-11 02:23:28 -0400
commitc9f6776d2b853bc89a12527ab799a514898c0eec (patch)
treea92a42c586ce548edcd0d99379c3fd4c759f5eaa /src/node_crypto_clienthello.h
parent46f40cfb4c3adb83d888202fa5dbc8a5e38fee2a (diff)
downloadnode-new-c9f6776d2b853bc89a12527ab799a514898c0eec.tar.gz
crypto: fix undefined behavior in ParseExtension
Many extensions are unknown to the `ClientHelloParser::ParseExtension`, do not cast user-supplied `uint16_t` to `enum`. PR-URL: https://github.com/nodejs/node/pull/7494 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/node_crypto_clienthello.h')
-rw-r--r--src/node_crypto_clienthello.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_crypto_clienthello.h b/src/node_crypto_clienthello.h
index b0b63fb2e3..3550807c20 100644
--- a/src/node_crypto_clienthello.h
+++ b/src/node_crypto_clienthello.h
@@ -91,7 +91,7 @@ class ClientHelloParser {
bool ParseRecordHeader(const uint8_t* data, size_t avail);
void ParseHeader(const uint8_t* data, size_t avail);
- void ParseExtension(ExtensionType type,
+ void ParseExtension(const uint16_t type,
const uint8_t* data,
size_t len);
bool ParseTLSClientHello(const uint8_t* data, size_t avail);