diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-03-15 16:27:26 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-03-15 16:27:26 +0000 |
commit | 9be25461b8f9ab996d7fff99c7f04b3d8dcccaa4 (patch) | |
tree | f1dde20fe04f990d2406275405972290ea1f27e1 /gnu | |
parent | 8332edeb582077739f86f898af5876386fbefc00 (diff) |
This should set msg_control using CMSG_SIZE(), and not assume that
sizeof(buffer) is the right size (alignments can mess it up). Code is
apparently not used, but it is better if all examples show the correct
idiom
ok hshoexer
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/perl/perl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/perl/perl.c b/gnu/usr.bin/perl/perl.c index 1674458edd5..c9799f0b349 100644 --- a/gnu/usr.bin/perl/perl.c +++ b/gnu/usr.bin/perl/perl.c @@ -451,7 +451,7 @@ Perl_dump_sv_child(pTHX_ SV *sv) be open, the wait would be forever. */ msg.msg_control = control.control; - msg.msg_controllen = sizeof(control.control); + msg.msg_controllen = CMSG_LEN(sizeof(int)); /* We're a connected socket so we don't need a destination */ msg.msg_name = NULL; msg.msg_namelen = 0; @@ -716,7 +716,7 @@ perl_destruct(pTHXx) int got_fd; msg.msg_control = control.control; - msg.msg_controllen = sizeof(control.control); + msg.msg_controllen = CMSG_LEN(sizeof(int)); /* We're a connected socket so we don't need a source */ msg.msg_name = NULL; msg.msg_namelen = 0; |