[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Change use of memcpy to memmove
From: |
Gavin D. Smith |
Subject: |
branch master updated: Change use of memcpy to memmove |
Date: |
Fri, 22 Nov 2024 15:19:12 -0500 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 8067b44fe5 Change use of memcpy to memmove
8067b44fe5 is described below
commit 8067b44fe55583a604a152a15f50c98e007994b7
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Fri Nov 22 20:12:53 2024 +0000
Change use of memcpy to memmove
* tp/Texinfo/XS/main/text.c (text_append_n): Change memcpy
call to memmove as this function is apparently called with
overlapping memory regions by 'protect_first_parenthesis'.
Report from Patrice for OpenBSD.
---
ChangeLog | 10 ++++++++++
tp/Texinfo/XS/main/text.c | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 44fe050564..d9fb4b99db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-11-22 Gavin Smith <gavinsmith0123@gmail.com>
+
+ Change use of memcpy to memmove
+
+ * tp/Texinfo/XS/main/text.c (text_append_n): Change memcpy
+ call to memmove as this function is apparently called with
+ overlapping memory regions by 'protect_first_parenthesis'.
+
+ Report from Patrice for OpenBSD.
+
2024-11-22 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/ConvertXS.pm (BEGIN), tp/Texinfo/IndicesXS.pm
diff --git a/tp/Texinfo/XS/main/text.c b/tp/Texinfo/XS/main/text.c
index 5fbe53fdd2..f72b3ae078 100644
--- a/tp/Texinfo/XS/main/text.c
+++ b/tp/Texinfo/XS/main/text.c
@@ -69,7 +69,7 @@ void
text_append_n (TEXT *t, const char *s, size_t len)
{
text_alloc (t, len + 1);
- memcpy (t->text + t->end, s, len);
+ memmove (t->text + t->end, s, len);
t->end += len;
t->text[t->end] = '\0';
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Change use of memcpy to memmove,
Gavin D. Smith <=