Skip to content

Use memmove for update_contact demunging to fix RISC-V test failure#501

Open
felixonmars wants to merge 1 commit into
hughsie:mainfrom
felixonmars:patch-1
Open

Use memmove for update_contact demunging to fix RISC-V test failure#501
felixonmars wants to merge 1 commit into
hughsie:mainfrom
felixonmars:patch-1

Conversation

@felixonmars
Copy link
Copy Markdown
Contributor

g_strlcpy() with overlapping buffers is undefined behavior and causes the as-self-test to fail on RISC-V, where the optimized memcpy does not handle the overlap:

"richard_at_hughsie_dot_co_dot_uk" -> "richard@hugh_ie.cot_ut_uk"

Use memmove() instead which handles overlapping regions correctly.

g_strlcpy() with overlapping buffers is undefined behavior and causes the as-self-test to fail on RISC-V, where the optimized memcpy does not handle the overlap:

  "richard_at_hughsie_dot_co_dot_uk" -> "richard@hugh_ie.cot_ut_uk"

Use memmove() instead which handles overlapping regions correctly.
felixonmars added a commit to felixonmars/archriscv-packages that referenced this pull request Mar 5, 2026
felixonmars added a commit to felixonmars/archriscv-packages that referenced this pull request Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant