Skip to content

Commit baed71b

Browse files
authored
Arm backend: Use padding for the base64 coded ETDump string (#13276)
This fix "base64: invalid input" errors you got sometimes when converting it to a file. This change also avoid using ' ', '\r', and '\n' in the base64 string for a cleaner string. Signed-off-by: Zingo Andersen <[email protected]>
1 parent 9c73b5d commit baed71b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/arm/executor_runner/arm_executor_runner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ void write_etdump(RunnerContext& ctx) {
759759
if (result.buf != nullptr && result.size > 0) {
760760
// On a device with no file system we can't just write it out
761761
// to the file-system so we base64 encode it and dump it on the log.
762-
int mode = 0;
762+
int mode = base64_enc_modifier_padding | base64_dec_modifier_skipspace;
763763
size_t len = result.size;
764764
size_t encoded_len = base64_encoded_size(result.size, mode);
765765
uint8_t* encoded_buf = reinterpret_cast<uint8_t*>(

0 commit comments

Comments
 (0)