Commit a2bc88f6 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Check max length of ALPN field

parent 5ce8ae79
......@@ -99,6 +99,11 @@ std::vector<unsigned char> set_alpn_prefs(const std::vector<char*>& protos)
len += 1 + n;
}
if(len > (1 << 16) - 1) {
LOG(FATAL) << "Too long ALPN identifier list: " << len;
DIE();
}
auto out = std::vector<unsigned char>(len);
auto ptr = out.data();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment