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

Re: [PATCH] check_aliased_update: strcpy() instead of strcat() to copy

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jun 10, 2010, 19:00 UTC
Message-ID
<AANLkTin8kU-Ods3GV3ZpetSdpu0tisipDuWzlqdiCLPT@mail.gmail.com>
In-Reply-To
<f99f845d5d0aa77b0a95c35f9289f1b031897d43.1276195180.git.trast@student.ethz.ch>
On Thu, Jun 10, 2010 at 18:43, Thomas Rast <trast@student.ethz.ch> wrote:
Show 7 quoted lines
> da3efdb (receive-pack: detect aliased updates which can occur with
> symrefs, 2010-04-19) introduced two strcat() into uninitialized
> strings.  The intent was clearly make a copy of the static buffer used
> by find_unique_abbrev(), so use strcpy() instead.
>
> Signed-off-by: Thomas Rast <trast@student.ethz.ch>
> Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Tested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
This fixes the problem I was having. Thanks.
Previous: Thomas RastNext: Jay Soffian
Message 10 of 11 in “log_ref_setup: don't return stack-allocated array”
  1. log_ref_setup: don't return stack-allocated arrayThomas Rast, Jun 10, 2010
  2. log_ref_setup: don't return stack-allocated arrayThomas Rast, Jun 10, 2010
  3. Erick MattosJun 10, 2010
  4. Thomas RastJun 10, 2010
  5. Erick MattosJun 10, 2010
  6. Jeff KingJun 11, 2010
  7. Erick MattosJun 11, 2010
  8. Ævar Arnfjörð BjarmasonJun 10, 2010
  9. check_aliased_update: strcpy() instead of strcat() to copyThomas Rast, Jun 10, 2010
  10. Ævar Arnfjörð BjarmasonJun 10, 2010
  11. Jay SoffianJun 10, 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.