summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-06-18 19:51:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-06-20 17:45:19 (GMT)
commit0539cc0038ff3411da1fea342b7d6615643bff5b (patch)
treed8be8b442d56b28de63051611c99821f2a58eab2 /fast-import.c
parentd12c24d2a96f8f9aeb100b800d8fb217f28a6a2a (diff)
downloadgit-0539cc0038ff3411da1fea342b7d6615643bff5b.zip
git-0539cc0038ff3411da1fea342b7d6615643bff5b.tar.gz
git-0539cc0038ff3411da1fea342b7d6615643bff5b.tar.bz2
stat_opt: check extra strlen call
As in earlier commits, the diff option parser uses starts_with to find that an argument starts with "--stat-", and then adds strlen("stat-") to find the rest of the option. However, in this case the starts_with and the strlen are separated across functions, making it easy to call the latter without the former. Let's use skip_prefix instead of raw pointer arithmetic to catch such a case. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fast-import.c')
0 files changed, 0 insertions, 0 deletions