Skip Menu |

This queue is for tickets about the File-Tail-App CPAN distribution.

Report information
The Basics
Id: 128473
Status: open
Priority: 0/
Queue: File-Tail-App

People
Owner: Nobody in particular
Requestors: Pascal [...] rkfd.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.4
Fixed in: (no value)



Subject: Use of uninitialized values
The below came up after a reboot. The last line was repeated continuously until I killed it. Restarted just fine. Use of uninitialized value $first_line in chomp at /usr/share/perl5/vendor_perl/File/Tail/App.pm line 145. Use of uninitialized value $first_line in split at /usr/share/perl5/vendor_perl/File/Tail/App.pm line 148. Use of uninitialized value $logged_ident in string ne at /usr/share/perl5/vendor_perl/File/Tail/App.pm line 149. Use of uninitialized value $md5_len in concatenation (.) or string at /usr/share/perl5/vendor_perl/File/Tail/App.pm line 167. Use of uninitialized value $md5_len in concatenation (.) or string at /usr/share/perl5/vendor_perl/File/Tail/App.pm line 167. Use of uninitialized value $md5_len in concatenation (.) or string at /usr/share/perl5/vendor_perl/File/Tail/App.pm line 167. Use of uninitialized value $md5_len in concatenation (.) or string at /usr/share/perl5/vendor_perl/File/Tail/App.pm line 167. Use of uninitialized value $md5_len in concatenation (.) or string at /usr/share/perl5/vendor_perl/File/Tail/App.pm line 167. Use of uninitialized value $md5_len in concatenation (.) or string at /usr/share/perl5/vendor_perl/File/Tail/App.pm line 167.
Looks like this happens when the file specified by lastrun_file is 0 bytes.
It would be nice if File::Tail::App strictly validated everything read from lastrun_file.
Good thinking thanks, I’ll have to take a look. If you have a patch that’d be cool too 👍
The below simply checks if the file is zero bytes, and if so, kills it. if ( -z $lastrun_file ) { unlink $lastrun_file or die "Can't unlink empty lastrun_file '$lastrun_file': $!"; }