Changelog
Source:NEWS.md
diffmatchpatch 0.2.1
- Fixed undefined behavior (left shift of negative values) in the Bitap matching code reported by CRAN’s clang-UBSAN checks. The bit masks are now unsigned; results are unchanged.
diffmatchpatch 0.2.0
CRAN release: 2026-11-13
Updated
diff_match_patch.hwith the upstream fix for a buffer overflow in line mode diffs when there are more than 127 unique lines, which could crash R (leutloff/diff-match-patch-cpp-stl#19).Fixed incorrect line mode diffs when there are more than 255 unique lines. The number of line codes is now capped and any remaining text is treated as a single line, following the approach used by the other diff-match-patch implementations.
Added a testthat test suite, with cases ported from the upstream test harness.