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

ps doesn't print long strings by default, because it depends on core->block. #4857

Open
Rot127 opened this issue Jan 22, 2025 · 1 comment
Open
Labels
bug Something isn't working RzUtil test-required

Comments

@Rot127
Copy link
Member

Rot127 commented Jan 22, 2025

Work environment

Questions Answers
OS/arch/bits (mandatory) All
File format of the file you reverse (mandatory) All
Architecture/bits of the file (mandatory) NA
rizin -v full output, not truncated (mandatory) rizin 0.8.0-git @ linux-x86-64, ee74d37

Expected behavior

ps (and psW, psM etc.) print a full string in a file by default.

Actual behavior

It prints only a string of sizeof(core->block) by default. Which is apparently by default 256 bytes.

Steps to reproduce the behavior

rizin -qc "psW" test/bins/cmd/search/string_encodings/Georgian-Lipsum.utf32le
ლორემ იფსუმ დოლორ სით ამეთ, ილლუმ ელაბორარეთ ად ჰას, ილლუმ იისყუ

But should be way longer.

(Binary from PR: rizinorg/rizin-testbins#167)

Additional Logs, screenshots, source code, configuration dump, ...

The implementation of rz_str_stringify_raw_buffer() to detect the strings, should use RzBuffer. Not a raw char * buffer. This way it can get the RzBuffer of the current RzIO.

Shouldn't be too complicated to refactor. At least not for the commands.

Related: #2695

@Rot127 Rot127 added bug Something isn't working RzUtil labels Jan 22, 2025
@well-mannered-goat
Copy link
Contributor

I am creating a RzBuffer of RzIO length in rz_str_stringify_raw_buffer()
but then i would also need to refactor the different functions used to get the rsize correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working RzUtil test-required
Projects
None yet
Development

No branches or pull requests

3 participants