Skip to content

Commit

Permalink
ensure data is available before reading sessionID length
Browse files Browse the repository at this point in the history
  • Loading branch information
jessetane committed Jun 13, 2016
1 parent f8e9075 commit fdd52f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ module.exports = function extractSNI (data) {
pos += 32;

// skip SessionID
if (pos > end - 1) return null;
var sessionIdLength = data[pos];
pos += 1 + sessionIdLength;

Expand Down

0 comments on commit fdd52f1

Please sign in to comment.