summaryrefslogtreecommitdiff
path: root/tests/diff/patch.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2019-06-07 11:12:42 +0200
committerPatrick Steinhardt <ps@pks.im>2019-06-13 11:03:46 +0200
commit10ac298c62b40a205e771f50f9171c900c0e50dd (patch)
treeda52e10e4f60a15542b99f063b945bfa5f8d75cf /tests/diff/patch.c
parenteb146e58664428d9e23bc84e0e9f75db7924ae37 (diff)
downloadlibgit2-10ac298c62b40a205e771f50f9171c900c0e50dd.tar.gz
attr_file: fix unescaping of escapes required for fnmatch
When parsing attribute patterns, we will eventually unescape the parsed pattern. This is required because we require custom escapes for whitespace characters, as normally they are used to terminate the current pattern. Thing is, we don't only unescape those whitespace characters, but in fact all escaped sequences. So for example if the pattern was "\*", we unescape that to "*". As this is directly passed to fnmatch(3) later, fnmatch would treat it as a simple glob matching all files where it should instead only match a file with name "*". Fix the issue by unescaping spaces, only. Add a bunch of tests to exercise escape parsing.
Diffstat (limited to 'tests/diff/patch.c')
0 files changed, 0 insertions, 0 deletions