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 /t/t9604/cvsroot | |
parent | daemon: use skip_prefix to avoid magic numbers (diff) | |
download | tgif-0539cc0038ff3411da1fea342b7d6615643bff5b.tar.xz |
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 't/t9604/cvsroot')
0 files changed, 0 insertions, 0 deletions