Merge branch 'cb/compat-mmap-is-private-read-only'
Code tightening. * cb/compat-mmap-is-private-read-only: compat: make sure git_mmap is not expected to writemaint
commit
a70d7827ac
|
|
@ -4,7 +4,7 @@ void *git_mmap(void *start, size_t length, int prot, int flags, int fd, off_t of
|
||||||
{
|
{
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
|
|
||||||
if (start != NULL || !(flags & MAP_PRIVATE))
|
if (start != NULL || flags != MAP_PRIVATE || prot != PROT_READ)
|
||||||
die("Invalid usage of mmap when built with NO_MMAP");
|
die("Invalid usage of mmap when built with NO_MMAP");
|
||||||
|
|
||||||
start = xmalloc(length);
|
start = xmalloc(length);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue