1
0
mirror of https://github.com/git/git.git synced 2024-10-20 13:28:13 +02:00
git/builtin
René Scharfe b1a013dd6a mailinfo: use strcmp() for string comparison
The array header is defined as:

	static const char *header[MAX_HDR_PARSED] = {
	     "From","Subject","Date",
	};

When looking for the index of a specfic string in that array, simply
use strcmp() instead of memcmp().  This avoids running over the end of
the string (e.g. with memcmp("Subject", "From", 7)) and gets rid of
magic string length constants.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-06-02 13:30:18 -07:00
..
add.c add: don't complain when adding empty project root 2013-12-26 10:46:26 -08:00
annotate.c
apply.c
archive.c
bisect--helper.c
blame.c Remove the line length limit for graft files 2013-12-27 16:46:25 -08:00
branch.c
bundle.c
cat-file.c cat-file: handle --batch format with missing type/size 2013-12-12 11:31:25 -08:00
check-attr.c
check-ignore.c
check-mailmap.c
check-ref-format.c
checkout-index.c
checkout.c
clean.c
clone.c Merge branch 'nd/transport-positive-depth-only' into maint 2014-02-05 13:58:52 -08:00
column.c
commit-tree.c
commit.c commit -v: strip diffs and submodule shortlogs from the commit message 2013-12-05 14:39:11 -08:00
config.c
count-objects.c
credential.c
describe.c
diff-files.c
diff-index.c
diff-tree.c
diff.c Merge branch 'nd/magic-pathspec' into maint 2013-12-17 11:21:34 -08:00
fast-export.c
fetch-pack.c git fetch-pack: add --diag-url 2013-12-09 14:54:47 -08:00
fetch.c Merge branch 'nd/transport-positive-depth-only' into maint 2014-02-05 13:58:52 -08:00
fmt-merge-msg.c
for-each-ref.c for-each-ref: remove unused variable 2013-12-30 12:23:51 -08:00
fsck.c
gc.c gc: notice gc processes run by other users 2014-01-02 16:15:29 -08:00
grep.c
hash-object.c
help.c
index-pack.c
init-db.c
log.c
ls-files.c
ls-remote.c
ls-tree.c
mailinfo.c mailinfo: use strcmp() for string comparison 2014-06-02 13:30:18 -07:00
mailsplit.c
merge-base.c Merge branch 'bm/merge-base-octopus-dedup' into maint 2014-02-13 13:38:59 -08:00
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c
mktag.c
mktree.c
mv.c mv: let 'git mv file no-such-dir/' error out on Windows, too 2014-01-10 11:28:12 -08:00
name-rev.c
notes.c
pack-objects.c
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c
prune.c
push.c
read-tree.c
receive-pack.c
reflog.c
remote-ext.c
remote-fd.c
remote.c
repack.c Merge branch 'sb/repack-in-c' into maint 2014-02-13 13:38:09 -08:00
replace.c
rerere.c
reset.c
rev-list.c
rev-parse.c rev-parse: be more careful with munging arguments 2013-12-09 14:39:16 -08:00
revert.c
rm.c
send-pack.c
shortlog.c
show-branch.c
show-ref.c
stripspace.c
symbolic-ref.c
tag.c
tar-tree.c
unpack-file.c
unpack-objects.c
update-index.c
update-ref.c
update-server-info.c
upload-archive.c
var.c
verify-pack.c
verify-tag.c
write-tree.c