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

Issue with search and terminal resize #515

Closed
koutcher opened this issue Aug 13, 2016 · 3 comments
Closed

Issue with search and terminal resize #515

koutcher opened this issue Aug 13, 2016 · 3 comments

Comments

@koutcher
Copy link
Collaborator

Tig version: 2.2

If you perform a search while displaying a commit in vertical split mode, tig exits right away with glibc complaining about a double free. The same operation works fine with tig-2.1.1.

Looks like at least view->width is not initialized, so problem could come from changes in apply_vertical_split implementation for commit 39acb5a.

@koutcher
Copy link
Collaborator Author

Problem occurs with ncurses-5.4 but not with ncurses-5.7.

@koutcher koutcher changed the title Issue with search and vertical split Issue with search and terminal resize Dec 1, 2016
@koutcher
Copy link
Collaborator Author

koutcher commented Dec 1, 2016

Problem is actually not linked to vertical split nor to ncurses version.

Crash occurs when the terminal is resized while a search is in progress. It is systematic with RHEL4 but could not be reproduced with RHEL6.

Valgrind shows that the problem comes from malloc in draw_view_line_search_result (introduced with commit bef366c in Tig 2.2). The allocated buffer is 1-byte too short.

@jonas
Copy link
Owner

jonas commented Dec 2, 2016

Fixed by #550

@jonas jonas closed this as completed Dec 2, 2016
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

No branches or pull requests

2 participants