Skip to content

fix null pointer dereference in screen_bottom_address() in librz/core… - #6833

Open
Syh-Xiong wants to merge 2 commits into
rizinorg:devfrom
Syh-Xiong:fix_null_pointer_dereference_in_screen_bottom_address
Open

Syh-Xiong wants to merge 2 commits into
rizinorg:devfrom
Syh-Xiong:fix_null_pointer_dereference_in_screen_bottom_address

Conversation

@Syh-Xiong

Copy link
Copy Markdown
Contributor

…/tui/visual.c

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).
  • I've used AI tools to generate fully or partially these code changes and I'm sure the changes are not copyrighted by somebody else.

Detailed description
I think when realloc fails to allocate and returns NULL into rtn, it will cause the subsequent memmove(rtn + 2, rtn, addr_len) to dereference a null pointer.

...

Test plan

...

Closing issues

...

@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.36%. Comparing base (4b103d1) to head (e6bdea5).

Files with missing lines Patch % Lines
librz/core/tui/visual.c 0.00% 6 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
librz/core/tui/visual.c 13.32% <0.00%> (-0.03%) ⬇️

... and 13 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b103d1...e6bdea5. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread librz/core/tui/visual.c Outdated
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