• Bug#267185: munin-graph spews uninitialized value in concatenation [pre

    From Don Armstrong@1:229/2 to All on Sat Aug 21 03:10:08 2004
    From: [email protected]

    --raC6veAxrt5nqIoY
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: inline
    Content-Transfer-Encoding: quoted-printable

    Package: munin
    Version: 1.0.1-1
    Severity: important
    Tags: patch

    munin-graph spews uninitialized value in concatenation warnings due to
    an operator presedence error in three places.

    $COLOUR[$col_count-1%@COLOUR] should be
    $COLOUR[($col_count-1)%@COLOUR] as % is higher precedence than -.

    The attached patch clears up this problem. [The above bug appears in
    three places in munin-graph... I haven't searched % - precedence
    issues elsewhere... might be something to look at.]


    Don Armstrong

    --
    This message brought to you by weapons of mass destruction related
    program activities, and the letter G.

    http://www.donarmstrong.com
    http://rzlab.ucr.edu

    --raC6veAxrt5nqIoY
    Content-Type: text/plain; charset=us-ascii
    Content-Disposition: attachment; filename="munin_graph_uninitialized_value.patch"
    Content-Transfer-Encoding: quoted-printable

    --- munin-1.0.1.orig/server/munin-graph.in
    +++ munin-1.0.1/server/munin-graph.in
    @@ -635,9 +635,9 @@

    push (@rrd_negatives, ($node->{client}->{$service}->{$negfield.".draw"} || "LINE2") .
    ":n" . $cdef . "g$negfield" .
    - ((defined $single_value and $single_value) ? $single_colour : $COLOUR[$col_count-1%@COLOUR]));
    + ((defined $single_value and $single_value) ? $single_colour : $COLOUR[($col_count-1)%@COLOUR]));
    push (@rrd_negatives, "HRULE:".$node->{client}->{$service}->{"$negfield.warn"}.
    - ((defined $single_value and $single_value) ? "#ff0000" : $COLOUR[$col_count-1%@COLOUR]))
    + ((defined $single_value and $single_va