mitsuhiko / similar

A high level diffing library for rust based on diffs
https://insta.rs/similar
Apache License 2.0
949 stars 31 forks source link

check for identical sequences in lcs to avoid overflow panic #43

Closed alexjg closed 1 year ago

alexjg commented 1 year ago

algorithms::lcs::diff was panicking for me if passed identical inputs. I've added a fix and a test to illustrate the problem.