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

Overlapping buffers in hist_word #234

Merged
merged 1 commit into from
Mar 20, 2021
Merged

Conversation

hyenias
Copy link

@hyenias hyenias commented Mar 20, 2021

While experimenting with #233, a memory segmentation fault occurred. A search of other emacs issues found a potential matching issue as described in att#791. Also, a duplicate PR of att#1489 was submitted. This commit back ports that fix.

src/cmd/ksh93/edit/history.c: hist_word():

  • Switch from using strcpy to memmove as the two strings could overlap.

While experimenting with ksh93#233, a memory segmentation fault occurred.
A search of other emacs issues found a potential matching issue as
described in att#791. Also, a duplicate
PR of att#1489 was submitted. This
commit backports that fix.

src/cmd/ksh93/edit/history.c: hist_word():
- Switch from using strcpy to memmove as the two strings could overlap.
@McDutchie
Copy link

LGTM, thanks.

@McDutchie McDutchie merged commit 3abbb0d into ksh93:master Mar 20, 2021
@hyenias hyenias deleted the hist_word branch January 29, 2022 01:05
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.

2 participants