git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] blame: prevent a segv when -L given start > EOF

From
Jay Soffian <jaysoffian@gmail.com>
Date
Feb 9, 2010, 04:00 UTC
Message-ID
<76718491002082000s7be5b32dob5b3dfe764b12da0@mail.gmail.com>
In-Reply-To
<7vtytrrrju.fsf@alter.siamese.dyndns.org>
On Mon, Feb 8, 2010 at 10:55 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> Jay Soffian <jaysoffian@gmail.com> writes:
>
>> -     if (lno < top)
>> +     if (lno < top || lno < bottom)
>>               die("file %s has only %lu lines", path, lno);
>
> Thanks; I think we make sure that "bottom < top" always hold true before
> we reach this point,
We swap them if they're reversed.
> so checking with bottom alone should suffice, no?
Ah true. You can squash that in? :-)
j.
Previous: Junio C HamanoNext: Jay Soffian
Message 4 of 11 in “blame: prevent a segv when -L given start > EOF”
  1. blame: prevent a segv when -L given start > EOFJay Soffian, Feb 9, 2010
  2. Jay SoffianFeb 9, 2010
  3. Junio C HamanoFeb 9, 2010
  4. Jay SoffianFeb 9, 2010
  5. Jay SoffianFeb 9, 2010
  6. Jay SoffianFeb 9, 2010
  7. Junio C HamanoFeb 9, 2010
  8. Johannes SixtFeb 9, 2010
  9. Jay SoffianFeb 9, 2010
  10. Junio C HamanoFeb 9, 2010
  11. blame: prevent a segv when -L given start > EOFJay Soffian, Feb 9, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.