Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for pdi with ahi 2 #7359

Merged
merged 2 commits into from Apr 26, 2017
Merged

fix for pdi with ahi 2 #7359

merged 2 commits into from Apr 26, 2017

Conversation

dzruyk
Copy link
Contributor

@dzruyk dzruyk commented Apr 26, 2017

r_core_disasm_pdi calls r_parse_filter after r_print_colorize_opcode,
this produces incorrect output when we use pdi with ahi 2.

before pull:

	$ r2 malloc://16
	[0x00000000]> e asm.arch=x86
	[0x00000000]> e asm.bits=64
	[0x00000000]> wx 48b96e74646c6c2e646c
	[0x00000000]> ahi 2
	[0x00000000]> pi 1
	movabs rcx, 'ld.lldtn'
	[0x00000000]> pdi 1
	0x00000000 48b96e74646c6c2e646c  movabs rcx, 0x6c642e6c6c64746e

after pull:

	$ r2 malloc://16
	[0x00000000]> e asm.arch=x86
	[0x00000000]> e asm.bits=64
	[0x00000000]> wx 48b96e74646c6c2e646c
	[0x00000000]> ahi 2
	[0x00000000]> pi 1
	movabs rcx, 'ld.lldtn'
	[0x00000000]> pdi 1
	0x00000000 48b96e74646c6c2e646c  movabs rcx, 'ld.lldtn'

Second commit in pull with some refactoring for simplifying r_core_disasm_pdi.

	r_parse_filter works incorectly with already escaped buffer
@radare
Copy link
Collaborator

radare commented Apr 26, 2017

if master is green it means that we lack some tests to cover this case

@radare
Copy link
Collaborator

radare commented Apr 26, 2017

can u send some tests pls?

@radare radare merged commit d52ebcc into radareorg:master Apr 26, 2017
@dzruyk
Copy link
Contributor Author

dzruyk commented Apr 26, 2017

Yes, no problem. I do it soon

dzruyk added a commit to dzruyk/radare2-regressions that referenced this pull request Apr 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants