Package: munin
Version: 2.0.5-1
Severity: normal
Tags: patch
Hi,
the code to read spoofetch data is slightly broken. It is to return
when there is a period on a single line, but it fails to catch the case
when that is a) the first thing the peer sends, or b) if \n.\n is spread
accross reads.
/usr/share/perl5/Munin/Master/Node.pm, _node_read_fast():
while (my $read_len = sysread($io_src, $buf, 4096, $offset)) {
$offset += $read_len;
# Stop when we read a \n.\n
# ... No need to have a full regex : simple index()
- last unless index($buf, "\n.\n", $offset - $read_len) < 0;
+ my $start_offset = $offset - $read_len - 3;
+ $start_offset = 0 if $start_offset < 0;
+ last if index($buf, "\n.\n", $start_offset) >= 0 || $buf eq
".\n";
}
Cheers,
weasel
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]