Skip to content

runtime error: index out of range while processing diff #102

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

Closed
qzaidi opened this issue Oct 29, 2019 · 2 comments
Closed

runtime error: index out of range while processing diff #102

qzaidi opened this issue Oct 29, 2019 · 2 comments

Comments

@qzaidi
Copy link

qzaidi commented Oct 29, 2019

Hi,
I am not using this library directly, but via another package (go-git). I have found that in certain cases, there is panic on this line

text[i] = lineArray[r]

At the time of panic, the values are

1 iteration ago: i=179592 r=55295 len(chars)=190439 len(lineArray)=58902
next iteration: i=179595 r=65533 len(chars)=190439 len(lineArray)=58902

so clearly lineArray[r] seems to exceed the allocated memory. I still have to understand the code to understand why this happens, but any ideas would be appreciated. Interestingly, in both cases, the diff being processed when panic was unicode.

@r-pai
Copy link
Contributor

r-pai commented Nov 14, 2019

Duplicate of #89

@sergi
Copy link
Owner

sergi commented Nov 19, 2019

Please follow the discussion in #89

@sergi sergi closed this as completed Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants