1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-02 15:28:21 +01:00
git/tools
Pavel Roskin e35f982415 [PATCH] mmap error handling
I have reviewed all occurrences of mmap() in git and fixed three types
of errors/defects:

1) The result is not checked.
2) The file descriptor is closed if mmap() succeeds, but not when it
fails.
3) Various casts applied to -1 are used instead of MAP_FAILED, which is
specifically defined to check mmap() return value.

[jc: This is a second round of Pavel's patch.  He fixed up the problem
that close() potentially clobbering the errno from mmap, which
the first round had.]

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-07-29 17:21:48 -07:00
..
git-applymbox Fix up applymbox script for the addition of "git-" prefix 2005-07-23 20:28:34 -07:00
git-applypatch Rename the "tools" programs to also have the "git-" prefix 2005-07-23 18:46:27 -07:00
mailinfo.c [PATCH] mailinfo: handle folded header. 2005-07-23 11:13:11 -07:00
mailsplit.c [PATCH] mmap error handling 2005-07-29 17:21:48 -07:00
Makefile Rename the "tools" programs to also have the "git-" prefix 2005-07-23 18:46:27 -07:00