diff options
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/backupfilehelper.cxx | 4 | ||||
-rw-r--r-- | comphelper/source/xml/xmltools.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx index 4c7917e96015..aa81039ad89c 100644 --- a/comphelper/source/misc/backupfilehelper.cxx +++ b/comphelper/source/misc/backupfilehelper.cxx @@ -158,9 +158,9 @@ namespace sal_uInt64 nBaseRead(0); // read rTarget - if (osl::File::E_None == rFile->read(static_cast<void*>(&aTarget[0]), nLength, nBaseRead) && nLength == nBaseRead) + if (osl::File::E_None == rFile->read(static_cast<void*>(aTarget.data()), nLength, nBaseRead) && nLength == nBaseRead) { - rTarget = OString(&aTarget[0], static_cast< sal_Int32 >(nLength)); + rTarget = OString(aTarget.data(), static_cast< sal_Int32 >(nLength)); return true; } diff --git a/comphelper/source/xml/xmltools.cxx b/comphelper/source/xml/xmltools.cxx index 24919ae35044..c8f8863a4db9 100644 --- a/comphelper/source/xml/xmltools.cxx +++ b/comphelper/source/xml/xmltools.cxx @@ -83,13 +83,13 @@ namespace comphelper sal_Int32 nLength = 1024+n; // coverity[tainted_data] - 1024 deliberate random minus max -127/plus max 128 std::vector<sal_uInt8> aChaff(nLength); - rtl_random_getBytes(pool, &aChaff[0], nLength); + rtl_random_getBytes(pool, aChaff.data(), nLength); rtl_random_destroyPool(pool); encodeChaff(aChaff); - return OString(reinterpret_cast<const sal_Char*>(&aChaff[0]), nLength); + return OString(reinterpret_cast<const sal_Char*>(aChaff.data()), nLength); } OString generateGUIDString() |