[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 41/43: exec: Avoid calling mmap with zero size
From: |
Samuel Thibault |
Subject: |
[hurd] 41/43: exec: Avoid calling mmap with zero size |
Date: |
Mon, 11 Sep 2017 07:10:12 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit e3e7590cbb15e675fbada1c0d012ffe43776e221
Author: Samuel Thibault <address@hidden>
Date: Sun Sep 10 23:07:54 2017 +0200
exec: Avoid calling mmap with zero size
mmap is supposed to return an error on passing a zero size.
* exec/exec.c (servercopy): Immediately return NULL if argsize is 0.
---
exec/exec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/exec/exec.c b/exec/exec.c
index f5995ac..d78c54c 100644
--- a/exec/exec.c
+++ b/exec/exec.c
@@ -773,6 +773,8 @@ servercopy (void *arg, mach_msg_type_number_t argsize,
boolean_t argcopy,
{
if (! argcopy)
return arg;
+ if (! argsize)
+ return NULL;
/* ARG came in-line, so we must copy it. */
void *copy;
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 05/43: ext2fs: Reduce verbosity of missing xattr support on the FS, (continued)
- [hurd] 05/43: ext2fs: Reduce verbosity of missing xattr support on the FS, Samuel Thibault, 2017/09/11
- [hurd] 11/43: build: Drop unused/unsubstituted config variables, Samuel Thibault, 2017/09/11
- [hurd] 10/43: Revert "Fix taking into account prefix for xkb-data installation", Samuel Thibault, 2017/09/11
- [hurd] 19/43: libdiskfs: Make mapping the time device more robust., Samuel Thibault, 2017/09/11
- [hurd] 01/43: procfs: Remove superfluous calls., Samuel Thibault, 2017/09/11
- [hurd] 13/43: Fix harmless indentation errors tripping [-Wmisleading-indentation]., Samuel Thibault, 2017/09/11
- [hurd] 22/43: libshouldbeinlibc: Fix wiring code., Samuel Thibault, 2017/09/11
- [hurd] 27/43: eth-multiplexer: Generalize function and improve error handling., Samuel Thibault, 2017/09/11
- [hurd] 32/43: eth-multiplexer: Fix type check., Samuel Thibault, 2017/09/11
- [hurd] 38/43: trans/mtab: Fix warnings., Samuel Thibault, 2017/09/11
- [hurd] 41/43: exec: Avoid calling mmap with zero size,
Samuel Thibault <=
- [hurd] 24/43: eth-multiplexer: Fix error handling., Samuel Thibault, 2017/09/11
- [hurd] 12/43: Fix typo., Samuel Thibault, 2017/09/11
- [hurd] 21/43: startup: Fix retrieving the privileged ports., Samuel Thibault, 2017/09/11
- [hurd] 25/43: eth-multiplexer: Implement getting the devices flags., Samuel Thibault, 2017/09/11
- [hurd] 20/43: ext2fs: Fix warning., Samuel Thibault, 2017/09/11
- [hurd] 18/43: Make build system more robust., Samuel Thibault, 2017/09/11
- [hurd] 14/43: procfs: Provide 'hostinfo'., Samuel Thibault, 2017/09/11
- [hurd] 23/43: startup: Improve error handling., Samuel Thibault, 2017/09/11
- [hurd] 28/43: eth-multiplexer: Allow setting of flags., Samuel Thibault, 2017/09/11
- [hurd] 33/43: libdiskfs: Use control class for the singleton 'bootinfo'., Samuel Thibault, 2017/09/11