Bug#1104900: libfile-tail-perl: Use of uninitialized value in numeric eq (==) at /usr/share/perl5/File/Tail.pm line 391.
Salvatore Bonaccorso
carnil at debian.org
Thu May 8 08:07:52 BST 2025
Source: libfile-tail-perl
Version: 1.3-7
Severity: normal
Tags: upstream patch
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=109163
X-Debbugs-Cc: carnil at debian.org
Hi
Under certain conditiion File::Tail might trigger a
| Use of uninitialized value in numeric eq (==) at /usr/share/perl5/File/Tail.pm line 391.
Upstream seems abandoned since 2015, but the same issue was reported
long time ago as well downstream in Fedora/RedHat (I have no minimal
reproducer available).
Cf. https://bugzilla.redhat.com/show_bug.cgi?id=1283764
They applied a fix for it:
diff -up File-Tail-1.3/Tail.pm.debug.fix File-Tail-1.3/Tail.pm.debug
--- File-Tail-1.3/Tail.pm.debug.fix 2020-11-13 10:54:58.354374382 -0500
+++ File-Tail-1.3/Tail.pm.debug 2020-11-13 10:55:23.809490680 -0500
@@ -382,6 +382,9 @@ sub reset_pointers {
if (defined($oldhandle)) {
# If file has not been changed since last OK read do not do anything
$st=stat($newhandle);
+ # inode 0 should never happen, so this should be safe to init to.
+ $object->{'inode'}=0 unless defined($object->{'inode'});
+ $object->{'curpos'}=0 unless defined($object->{'curpos'});
# lastread uses fractional time, stat doesn't. This can cause false
# negatives.
# If the file was changed the same second as it was last read,
diff -up File-Tail-1.3/Tail.pm.fix File-Tail-1.3/Tail.pm
We could do the same for our packaging.
Regards,
Salvatore
More information about the pkg-perl-maintainers
mailing list