Permalink
Browse files

Make sure we never try to read more then the max buffer size in JRuby…

…::Pump.
  • Loading branch information...
1 parent 701f486 commit 5a2328976ccf87a8059c83292280223a6fe5d0d2 @jarib jarib committed Feb 5, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/childprocess/jruby/pump.rb
@@ -30,6 +30,7 @@ def pump
while read != -1
avail = [@input.available, 1].max
+ avail = BUFFER_SIZE if avail > BUFFER_SIZE
read = @input.read(buffer, 0, avail)
if read > 0

0 comments on commit 5a23289

Please sign in to comment.