Skip to content

Comments

Fix for stacking mixed output redirects.#5000

Merged
notxvilka merged 1 commit intorizinorg:devfrom
karliss:stacked-redirec
Mar 14, 2025
Merged

Fix for stacking mixed output redirects.#5000
notxvilka merged 1 commit intorizinorg:devfrom
karliss:stacked-redirec

Conversation

@karliss
Copy link
Member

@karliss karliss commented Mar 14, 2025

That is redirect to file + redirect to buffer which happens when calling rz_core_cmd_str .

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository.
  • I made sure to follow the project's coding style.
  • I've documented every RZ_API function and struct this PR changes.
  • I've added tests that prove my changes are effective (required for changes to RZ_API).
  • I've updated the Rizin book with the relevant information (if needed).

Detailed description

Problem discovered while investigating rizinorg/cutter#3426 but as shown by testcase it's possible to trigger it purely within rizin as well.

In case of cutter it could be simply triggered by running cmd > outputfile in console widget.

Test plan

In addition to command test, I also tested the patch fixes basic redirect case in Cutter.

Closing issues

That is redirect to file + redirect to buffer which happens when calling rz_core_cmd_str .
Copy link
Contributor

@notxvilka notxvilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good finding!

@notxvilka notxvilka merged commit 55a4f9e into rizinorg:dev Mar 14, 2025
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants