Skip to content

brei: copy protocol strings out of the protocol buffers

Peter Hutterer requested to merge whot/libei:wip/string-copy into main

With our strings being a 4-byte header followed by the string itself, they're virtually guaranteed not to be 8-byte aligned. This causes an issue on some architectures so we need to copy the string out before we access it.

Since strings are the only protocol type with that extra buffer, let's hack this in with the minimum effort approach - a null-terminated char * pointer array that's filled with the strings as they appear in on the wire. The brei_arg->s points to one of those strings as needed.

Fixes #41 (closed)

Merge request reports