File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 18
18
19
19
#include < common/parser.h>
20
20
#include < sstream>
21
+ #include < memory>
21
22
#include < string>
22
23
#include < fmt/core.h>
23
24
#include " common.h"
26
27
#include < json/json.h>
27
28
#include < app_mode.h>
28
29
#include < hexutils.h>
30
+ #include < stdlib.h>
29
31
30
32
std::vector<std::string> dumpUI (parser_context_t *ctx,
31
33
uint16_t maxKeyLen,
@@ -131,8 +133,11 @@ void check_testcase(const testcase_t &tc, bool expert_mode) {
131
133
parser_context_t ctx = {0 };
132
134
parser_error_t err = parser_unexpected_error;
133
135
134
- uint8_t buffer[10000 ] = {0 };
135
- const uint16_t bufferLen = parseHexString (buffer, sizeof (buffer), tc.blob .c_str ());
136
+ auto bufferCap = 1 <<17 ; // 132 KiB
137
+ std::unique_ptr<uint8_t > buffer{new int [bufferCap]};
138
+ if (buffer == nullptr ) { abort (); }
139
+
140
+ const uint16_t bufferLen = parseHexString (buffer, bufferCap, tc.blob .c_str ());
136
141
137
142
parser_tx_t tx_obj;
138
143
memset (&tx_obj, 0 , sizeof (tx_obj));
You can’t perform that action at this time.
0 commit comments