brei: use memcpy for the 64bit protocol copy

On some architectures (ARM, afaik) addresses needs to be a multiple
of their word size. Since the protocol doesn't enforce alignment on
multiples of 8, let's use a memcpy to copy any 64-bit number instad of
the pointer access.
This commit is contained in:
Peter Hutterer 2023-03-01 11:51:51 +10:00
parent 086f96a702
commit 2157a9344e

View file

@ -215,7 +215,7 @@ brei_demarshal(struct brei_context *brei, struct iobuf *buf, const char *signatu
case 'o':
case 'n':
case 't':
arg->x = *(uint64_t *) p;
memcpy(&arg->x, p, sizeof(arg->x));
p++;
p++;
break;