Commit 2d10545
apply: use strcmp(3) for comparing strings in gitdiff_verify_name()
We don't know the length of the C string "another". It could be
shorter than "name", which we compare it to using memchr(3). Call
strcmp(3) instead to avoid running over the end of the former, and
get rid of a strlen(3) call as a bonus.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 8bc172e commit 2d10545
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
956 | 956 | | |
957 | 957 | | |
958 | 958 | | |
959 | | - | |
960 | 959 | | |
961 | 960 | | |
962 | 961 | | |
963 | 962 | | |
964 | 963 | | |
965 | | - | |
| 964 | + | |
966 | 965 | | |
967 | 966 | | |
968 | 967 | | |
| |||
0 commit comments