summaryrefslogtreecommitdiff
path: root/ext/IPC
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-03-19 03:15:58 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-03-19 03:15:58 +0000
commit41d6edb2c1acac32a0296d594f0943752d23f077 (patch)
tree66ec857b54096fa525d2f4fa3f1741b9f8f9462e /ext/IPC
parentd929ce6fe8f415355968ae904607a49f36ad5c70 (diff)
downloadperl-41d6edb2c1acac32a0296d594f0943752d23f077.tar.gz
Taint msgrcv() messages; general SysV IPC cleanup.
p4raw-id: //depot/cfgperl@5812
Diffstat (limited to 'ext/IPC')
-rw-r--r--ext/IPC/SysV/Msg.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/IPC/SysV/Msg.pm b/ext/IPC/SysV/Msg.pm
index 099329826f..120a5b2d3a 100644
--- a/ext/IPC/SysV/Msg.pm
+++ b/ext/IPC/SysV/Msg.pm
@@ -90,14 +90,14 @@ sub rcv {
msgrcv($$self,$buf,$_[1],$_[2] || 0, $_[3] || 0) or
return;
my $type;
- ($type,$_[0]) = unpack("L a*",$buf);
+ ($type,$_[0]) = unpack("l! a*",$buf);
$type;
}
sub snd {
@_ <= 4 && @_ >= 3 or croak '$msg->snd( TYPE, BUF, FLAGS )';
my $self = shift;
- msgsnd($$self,pack("L a*",$_[0],$_[1]), $_[2] || 0);
+ msgsnd($$self,pack("l! a*",$_[0],$_[1]), $_[2] || 0);
}
@@ -111,12 +111,12 @@ IPC::Msg - SysV Msg IPC object class
=head1 SYNOPSIS
- use IPC::SysV qw(IPC_PRIVATE S_IRWXU S_IRWXG S_IRWXO);
+ use IPC::SysV qw(IPC_PRIVATE S_IRWXU);
use IPC::Msg;
- $msg = new IPC::Msg(IPC_PRIVATE, S_IRWXU | S_IRWXG | S_IRWXO);
+ $msg = new IPC::Msg(IPC_PRIVATE, S_IRWXU);
- $msg->snd(pack("L a*",$msgtype,$msg));
+ $msg->snd(pack("l! a*",$msgtype,$msg));
$msg->rcv($buf,256);
@@ -157,8 +157,8 @@ Returns the system message queue identifier.
=item rcv ( BUF, LEN [, TYPE [, FLAGS ]] )
-Read a message from the queue. Returns the type of the message read. See
-L<msgrcv>
+Read a message from the queue. Returns the type of the message read.
+See L<msgrcv>. The BUF becomes tainted.
=item remove