binaryurp/source/writer.cxx                  |    4 ++--
 connectivity/source/drivers/dbase/DTable.cxx |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 9f25059ea15b039c68aed2aa91819bf62a9044cf
Author:     Neacsa Leonard <[email protected]>
AuthorDate: Sat Nov 22 13:10:58 2025 +0200
Commit:     Ilmari Lauhakangas <[email protected]>
CommitDate: Mon Dec 8 07:58:45 2025 +0100

    tdf#163691 Use std::copy() and std::copy_n instead of memcpy()
    
    Signed-off-by: Neacsa Leonard <[email protected]>
    Change-Id: I7d69cbb0c93f5d9223607f519bbcf5e2acb393cc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194359
    Tested-by: Jenkins
    Reviewed-by: Ilmari Lauhakangas <[email protected]>

diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx
index d9a131c578ef..47744e30d568 100644
--- a/binaryurp/source/writer.cxx
+++ b/binaryurp/source/writer.cxx
@@ -425,9 +425,9 @@ void Writer::sendMessage(std::vector< unsigned char > const 
& buffer) {
     }
     css::uno::Sequence<sal_Int8> s(header.size() + k);
     assert(!header.empty());
-    std::memcpy(s.getArray(), header.data(), header.size());
+    std::copy_n(header.data(), header.size(), s.getArray());
     for (;;) {
-        std::memcpy(s.getArray() + s.getLength() - k, p, k);
+        std::copy(p, p + k, s.getArray() + header.size());
         try {
             bridge_->getConnection()->write(s);
         } catch (const css::io::IOException & e) {
diff --git a/connectivity/source/drivers/dbase/DTable.cxx 
b/connectivity/source/drivers/dbase/DTable.cxx
index a9130096b185..3182ba67f5fc 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -1933,7 +1933,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, 
const OValueRefRow& pOrgRo
                     OString aStr = RepeatedChar('0', nLen - aBlock.length) + 
aBlock;
 
                     // Copy characters:
-                    memcpy(pData, aStr.getStr(), nLen);
+                    std::copy_n(aStr.getStr(), nLen, pData);
                 }   break;
                 default:
                 {

Reply via email to