summaryrefslogtreecommitdiff
path: root/src/mongo/util/net/ssl_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/net/ssl_manager.cpp')
-rw-r--r--src/mongo/util/net/ssl_manager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/util/net/ssl_manager.cpp b/src/mongo/util/net/ssl_manager.cpp
index 6cd55213043..df1022648e5 100644
--- a/src/mongo/util/net/ssl_manager.cpp
+++ b/src/mongo/util/net/ssl_manager.cpp
@@ -36,6 +36,7 @@
#include <string>
#include <vector>
+#include "mongo/base/data_view.h"
#include "mongo/base/init.h"
#include "mongo/bson/bsonobjbuilder.h"
#include "mongo/client/internal_auth.h"
@@ -1050,7 +1051,7 @@ StatusWith<DERToken> DERToken::parse(ConstDataRange cdr, size_t* outLength) {
derLength = ConstDataView(lengthBuffer.data()).read<BigEndian<uint64_t>>();
} else {
// Length is <= 127 bytes, i.e. short form of length
- derLength = initialLengthByte;
+ derLength = ConstDataView(&initialLengthByte).read<uint8_t>();
}
// This is the total length of the TLV and all data