Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
1cd0f1bd
Kaydet (Commit)
1cd0f1bd
authored
Agu 25, 2012
tarafından
Arnaud Versini
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replace usage of rtl/memory.h in comphelper with equivalent from string.h
Change-Id: I41d452aa4892606d127e9565cf83c21f78a67392
üst
2da4a011
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
servicehelper.hxx
comphelper/inc/comphelper/servicehelper.hxx
+2
-2
accimplaccess.cxx
comphelper/source/misc/accimplaccess.cxx
+2
-1
docpasswordhelper.cxx
comphelper/source/misc/docpasswordhelper.cxx
+6
-5
No files found.
comphelper/inc/comphelper/servicehelper.hxx
Dosyayı görüntüle @
1cd0f1bd
...
...
@@ -78,7 +78,7 @@ classname* classname::getImplementation( const uno::Reference< uno::XInterface >
UNO3_GETIMPLEMENTATION_BASE_IMPL(classname)\
sal_Int64 SAL_CALL classname::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException) \
{ \
if( rId.getLength() == 16 && 0 ==
rtl_compareMemory
( getUnoTunnelId().getConstArray(), \
if( rId.getLength() == 16 && 0 ==
memcmp
( getUnoTunnelId().getConstArray(), \
rId.getConstArray(), 16 ) ) \
{ \
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); \
...
...
@@ -90,7 +90,7 @@ sal_Int64 SAL_CALL classname::getSomething( const ::com::sun::star::uno::Sequenc
UNO3_GETIMPLEMENTATION_BASE_IMPL(classname)\
sal_Int64 SAL_CALL classname::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException) \
{ \
if( rId.getLength() == 16 && 0 ==
rtl_compareMemory
( getUnoTunnelId().getConstArray(), \
if( rId.getLength() == 16 && 0 ==
memcmp
( getUnoTunnelId().getConstArray(), \
rId.getConstArray(), 16 ) ) \
{ \
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); \
...
...
comphelper/source/misc/accimplaccess.cxx
Dosyayı görüntüle @
1cd0f1bd
...
...
@@ -23,6 +23,7 @@
#include <cppuhelper/typeprovider.hxx>
#include <set>
#include <string.h>
//.........................................................................
namespace
comphelper
...
...
@@ -113,7 +114,7 @@ namespace comphelper
sal_Int64
nReturn
(
0
);
if
(
(
_rIdentifier
.
getLength
()
==
16
)
&&
(
0
==
rtl_compareMemory
(
getUnoTunnelImplementationId
().
getConstArray
(),
_rIdentifier
.
getConstArray
(),
16
)
)
&&
(
0
==
memcmp
(
getUnoTunnelImplementationId
().
getConstArray
(),
_rIdentifier
.
getConstArray
(),
16
)
)
)
nReturn
=
reinterpret_cast
<
sal_Int64
>
(
this
);
...
...
comphelper/source/misc/docpasswordhelper.cxx
Dosyayı görüntüle @
1cd0f1bd
...
...
@@ -25,6 +25,7 @@
#include <osl/time.h>
#include <rtl/digest.h>
#include <rtl/random.h>
#include <string.h>
using
::
rtl
::
OUString
;
using
::
com
::
sun
::
star
::
uno
::
Sequence
;
...
...
@@ -269,10 +270,10 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
if
(
!
aPassword
.
isEmpty
()
&&
aDocId
.
getLength
()
==
16
)
{
sal_uInt16
pPassData
[
16
];
rtl_zeroMemory
(
pPassData
,
sizeof
(
pPassData
)
);
memset
(
pPassData
,
0
,
sizeof
(
pPassData
)
);
sal_Int32
nPassLen
=
::
std
::
min
<
sal_Int32
>
(
aPassword
.
getLength
(),
15
);
rtl_copyMemor
y
(
pPassData
,
aPassword
.
getStr
(),
nPassLen
*
sizeof
(
pPassData
[
0
])
);
memcp
y
(
pPassData
,
aPassword
.
getStr
(),
nPassLen
*
sizeof
(
pPassData
[
0
])
);
aResultKey
=
GenerateStd97Key
(
pPassData
,
aDocId
);
}
...
...
@@ -287,7 +288,7 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
if
(
pPassData
[
0
]
&&
aDocId
.
getLength
()
==
16
)
{
sal_uInt8
pKeyData
[
64
];
rtl_zeroMemory
(
pKeyData
,
sizeof
(
pKeyData
)
);
memset
(
pKeyData
,
0
,
sizeof
(
pKeyData
)
);
sal_Int32
nInd
=
0
;
...
...
@@ -317,7 +318,7 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
// Update digest with padding.
pKeyData
[
16
]
=
0x80
;
rtl_zeroMemory
(
pKeyData
+
17
,
sizeof
(
pKeyData
)
-
17
);
memset
(
pKeyData
+
17
,
0
,
sizeof
(
pKeyData
)
-
17
);
pKeyData
[
56
]
=
0x80
;
pKeyData
[
57
]
=
0x0a
;
...
...
@@ -328,7 +329,7 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
rtl_digest_rawMD5
(
hDigest
,
(
sal_uInt8
*
)
aResultKey
.
getArray
(),
aResultKey
.
getLength
()
);
// Erase KeyData array and leave.
rtl_zeroMemory
(
pKeyData
,
sizeof
(
pKeyData
)
);
memset
(
pKeyData
,
0
,
sizeof
(
pKeyData
)
);
}
return
aResultKey
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment