summaryrefslogtreecommitdiff
path: root/tests/diff/diffiter.c
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-02-22 22:55:50 -0800
committerStan Hu <stanhu@gmail.com>2018-05-05 14:54:27 -0700
commit9d83a2b08724211e564bffca740cd5fdc93d890e (patch)
tree769c2369cf8b20156ecc8d2d74791597a3ec271c /tests/diff/diffiter.c
parent0ad2372b4309f511c48c8e293f1eec396468595a (diff)
downloadlibgit2-9d83a2b08724211e564bffca740cd5fdc93d890e.tar.gz
Sanitize the hunk header to ensure it contains UTF-8 valid data
The diff driver truncates the hunk header text to 80 bytes, which can truncate 4-byte Unicode characters and introduce garbage characters in the diff output. This change sanitizes the hunk header before it is displayed. This mirrors the test in git: https://github.com/git/git/blob/master/t/t4025-hunk-header.sh Closes https://github.com/libgit2/rugged/issues/716
Diffstat (limited to 'tests/diff/diffiter.c')
0 files changed, 0 insertions, 0 deletions