git: e599810ded07 - main - tail: Initialize the stat buffer used when input is stdin

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Thu, 08 Sep 2022 20:32:36 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=e599810ded07590708437cf58b8dd05f7cb474e5

commit e599810ded07590708437cf58b8dd05f7cb474e5
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2022-09-08 20:21:39 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2022-09-08 20:21:39 +0000

    tail: Initialize the stat buffer used when input is stdin
    
    PR:             266284
    Reported by:    Jenkins via delphij
    Fixes:          7e11889959a6 ("tail: Fix -f with stdin")
    MFC after:      3 days
---
 usr.bin/tail/tail.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c
index 51598d451bed..9d81a14cc7d0 100644
--- a/usr.bin/tail/tail.c
+++ b/usr.bin/tail/tail.c
@@ -273,6 +273,7 @@ main(int argc, char *argv[])
 		} else if (fflag) {
 			file.file_name = fn;
 			file.fp = stdin;
+			file.st = sb;
 			follow(&file, style, off);
 		} else {
 			forward(stdin, fn, style, off, &sb);