cutter
cutter copied to clipboard
Incorrect assembly of nops when newlines present.
Environment information
- Operating System: linuxmint 20.2
- Cutter version: 2.0.3
- File format: elf64
- Arch: x86
- Type:
Describe the bug
Assembly of nop
s with trailing newlines produces incorrect result (single nop
only).
To Reproduce Steps to reproduce the behavior:
- Assemble the following instruction(s). Note: pay attention to the newlines in the instruction.
nop;nop;nop;nop;
In hex view the string to paste would be stored as
00000000: 6e6f 703b 6e6f 703b 6e6f 703b 6e6f 703b nop;nop;nop;nop;
00000010: 0a0a 0a
Expected behavior
Assembly of four nop
s.
Screenshots
Additional context Removing the last newline will lead to correct assembly, so it has to do with two trailing newlines. Stripping whitespace won't fix this issue, as this bug still occurs, when there are instructions after the newlines. I stumbled arcoss this when I was modifying some assebly and pasted the instructions after modified them in my text editor.