--- a/src/lib/BasicASN1Reader.h Sat Jun 19 22:43:00 2021 +0200
+++ b/src/lib/BasicASN1Reader.h Sun Jun 20 10:23:50 2021 +0200
@@ -18,6 +18,7 @@
#include <memory>
#include <vector>
+#include <array>
#include "ASN1Reader.h"
@@ -43,8 +44,8 @@
bool started = false;
void readNext() {
- char type;
- read(&type, 1);
+ std::array<char, 2> typeAndLength;
+ read(typeAndLength.data(), typeAndLength.size());
commit();
if (!started) {
@@ -55,7 +56,8 @@
handlers.writeCollectionStart(ASN1ContentHandler::CollectionType::Sequence);
handlers.writeNull();
handlers.writeBoolean(true);
- handlers.writeInteger(type);
+ handlers.writeInteger(typeAndLength[0]);
+ handlers.writeInteger(typeAndLength[1]);
handlers.writeString(ASN1ContentHandler::StringType::UTF8String, "relational pipes");
handlers.writeCollectionEnd();