diff options
| author | Jonathan Corbet <corbet@lwn.net> | 2021-10-04 16:44:16 -0600 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2021-10-04 16:44:16 -0600 |
| commit | b718f9d919d16fb7b97a890f74d34593d9cecd20 (patch) | |
| tree | ed38d58283ae36e0478bac2e0d244e06dbcc2f1c /tools/arch/x86/lib/insn.c | |
| parent | 250a0a5ba9d2cfbdb7c77b421ff1e03d630bea46 (diff) | |
| parent | 9e1ff307c779ce1f0f810c7ecce3d95bbae40896 (diff) | |
Merge tag 'v5.15-rc4' into docs-next
This is needed to get a docs fix that entered via the DRM tree; testers
have requested it so that PDF builds in docs-next work again.
Diffstat (limited to 'tools/arch/x86/lib/insn.c')
| -rw-r--r-- | tools/arch/x86/lib/insn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/arch/x86/lib/insn.c b/tools/arch/x86/lib/insn.c index c41f95815480..797699462cd8 100644 --- a/tools/arch/x86/lib/insn.c +++ b/tools/arch/x86/lib/insn.c @@ -37,10 +37,10 @@ ((insn)->next_byte + sizeof(t) + n <= (insn)->end_kaddr) #define __get_next(t, insn) \ - ({ t r = *(t*)insn->next_byte; insn->next_byte += sizeof(t); leXX_to_cpu(t, r); }) + ({ t r; memcpy(&r, insn->next_byte, sizeof(t)); insn->next_byte += sizeof(t); leXX_to_cpu(t, r); }) #define __peek_nbyte_next(t, insn, n) \ - ({ t r = *(t*)((insn)->next_byte + n); leXX_to_cpu(t, r); }) + ({ t r; memcpy(&r, (insn)->next_byte + n, sizeof(t)); leXX_to_cpu(t, r); }) #define get_next(t, insn) \ ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); }) |
