Commits

Diab Jerius committed 341e744

incorreclty passed raw buffer rather than requested length to input channel handlers

Comments (0)

Files changed (2)

lib/Hg/Lib/Server/Pipe.pm

 
             when ( $opts->{inchannels} ) {
 
-                $self->writeblock( $opts->{inchannels}{$ch}->( $buffer ) );
+                $self->writeblock( $opts->{inchannels}{$ch}->( $len ) );
             }
 
             when ( $opts->{outchannels} ) {

t/Hg/Lib/Server/Pipe/runcommand.t

     my $server = $self->{server};
 
     sub handle_L {
-        # my $buffer = shift;
+        my $length = shift;
+	die( "bad length to L handler\n" )
+	    unless $length == 4096;
         state $i = 5;
         return $i ? sprintf( "%03d\n", $i-- ) : '';
     }