infinite loop with amflush & infinite tapecycle

[email protected] 23 Apr 2018 18:59:01 -0000
Newsgroups gmane.comp.archivers.amanda.devel
Message-ID <[email protected]>
If amanda.conf setup has "tapecycle inf tapes", amflush will
get into an infinite loop in perl/Amanda/Amflush.pm::roll_amdump_logs():

    my $days = getconf($CNF_TAPECYCLE) + 2;
    for (my $i = $days-1; $i >= 1; $i--) {
        my $a = pop @files;
    }

The simple patch for this is:

    for (my $i = $days-1; @files && $i >= 1; $i--) {

This exists in 3.4.5 and 3.5.1, but not 3.3.4.