We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59db544 commit ae94a21Copy full SHA for ae94a21
src/plugins/process/common/tlsParser/extensionReaders/extensionReader.hpp
@@ -47,10 +47,12 @@ class ExtensionReader : public RangeReader {
47
return std::nullopt;
48
}
49
50
- const auto extensionBegin = payload.data() + sizeof(type) + sizeof(length);
51
-
+ if (sizeof(type) + sizeof(length) + length > payload.size()) {
+ return std::nullopt;
52
+ }
53
payload = payload.subspan(sizeof(type) + sizeof(length) + length);
54
55
+ const std::byte* extensionBegin = payload.data() + sizeof(type) + sizeof(length);
56
return TLSExtension {type, {extensionBegin, length}};
57
});
58
0 commit comments