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

Re: [PATCH] wt-status: Don't find scissors line beyond buf len

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 7, 2024, 21:09 UTC
Message-ID
<CAPig+cTgusL7OH=5DJY9ef4YuLw5WBKgDFcbSu=QKFjjkforkw@mail.gmail.com>
In-Reply-To
<xmqq7cidlqg5.fsf@gitster.g>
On Thu, Mar 7, 2024 at 3:47 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
>  * So here is the version I queued.  I have a new paragraph at the
>    end of the log message to talk about use of strstr() and how it
>    is OK in the current codebase.
> [jc: tweaked the commit log message and the implementation a bit]
>
> From: Florian Schmidt <flosch@nutanix.com>
>
> In general, if wt_status_locate_end() is given a piece of the memory
> that lacks NUL at all, strstr() may continue across page boundaries
> and run into an unmapped page.  For our current callers, this is not
> a problem, as all of them except one uses a memory owned by a strbuf
> (which guarantees an implicit NUL-termination after its payload),
> and the one exeption in trailer.c:find_end_of_log_message() uses
> strlen() to compute the length before calling this function.
s/exeption/exception/
Previous: Junio C HamanoNext: Kristoffer Haugsbakk
Message 4 of 14 in “wt-status: Don't find scissors line beyond buf len”
  1. wt-status: Don't find scissors line beyond buf lenFlorian Schmidt, Mar 7, 2024
  2. Junio C HamanoMar 7, 2024
  3. Junio C HamanoMar 7, 2024
  4. Eric SunshineMar 7, 2024
  5. Kristoffer HaugsbakkMar 7, 2024
  6. Junio C HamanoMar 7, 2024
  7. Eric SunshineMar 7, 2024
  8. Kristoffer HaugsbakkMar 7, 2024
  9. Florian SchmidtMar 8, 2024
  10. Junio C HamanoMar 8, 2024
  11. Florian SchmidtMar 8, 2024
  12. Linus ArverApr 6, 2024
  13. Junio C HamanoMar 7, 2024
  14. Florian SchmidtMar 8, 2024

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.