diff options
| author | Jeff King <peff@peff.net> | 2014-06-18 15:51:17 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2014-06-20 10:45:19 -0700 |
| commit | 0539cc0038ff3411da1fea342b7d6615643bff5b (patch) | |
| tree | d8be8b442d56b28de63051611c99821f2a58eab2 /fetch-pack.c | |
| parent | d12c24d2a96f8f9aeb100b800d8fb217f28a6a2a (diff) | |
| download | git-0539cc0038ff3411da1fea342b7d6615643bff5b.tar.gz | |
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 'fetch-pack.c')
0 files changed, 0 insertions, 0 deletions
