From: Patrick Steinhardt Date: Wed, 15 Jul 2026 06:58:23 GMT Subject: Re: [PATCH 06/11] compat/pread: check initial lseek for errors Message-ID: In-Reply-To: On Tue, Jul 14, 2026 at 10:48:39PM +0000, Johannes Schindelin via GitGitGadget wrote: > diff --git a/compat/pread.c b/compat/pread.c > index 484e6d4c71..ac7d058cb8 100644 > --- a/compat/pread.c > +++ b/compat/pread.c > @@ -7,6 +7,8 @@ ssize_t git_pread(int fd, void *buf, size_t count, off_t offset) > ssize_t rc; > > current_offset = lseek(fd, 0, SEEK_CUR); > + if (current_offset < 0) > + return -1; > > if (lseek(fd, offset, SEEK_SET) < 0) > return -1; Heh, funny. I wanted to complain about misindentation here, but your new code is actually indented correctly. It's everything else in this file that is indented with spaces. Patrick