Skip to content

Commit

Permalink
RT#67694: Fix a potential infinite-loop condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
rjray committed Aug 14, 2011
1 parent 294c25c commit 9babd1c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Apache/RPC/Server.pm
Expand Up @@ -158,6 +158,10 @@ sub handler ($$) ## no critic (ProhibitExcessComplexity)
while ($length)
{
$r->read($content, ($length < 2048) ? $length : 2048);
# If $content is undef, then the client has closed the connection
# on its end, and we're done (like it or not).
last if (! defined $content);

$length -= length $content;
if ($do_compress)
{
Expand Down

0 comments on commit 9babd1c

Please sign in to comment.