Kaydet (Commit) 775bf0c7 authored tarafından Caolán McNamara's avatar Caolán McNamara

test coverity sanitizing in-source modelling

Change-Id: I31b1f021c414b26372c07a28c235bedb3e5a2b32
üst f9b32576
......@@ -1020,6 +1020,10 @@ RTParamMode MethodList::getMethodParamMode(sal_uInt16 index, sal_uInt16 paramInd
return aMode;
}
#if defined(__COVERITY__)
extern "C" void __coverity_tainted_data_sanitize__(void *);
#endif
sal_uInt16 MethodList::getMethodExcCount(sal_uInt16 index)
{
sal_uInt16 aCount = 0;
......@@ -1028,6 +1032,9 @@ sal_uInt16 MethodList::getMethodExcCount(sal_uInt16 index)
{
try {
aCount = readUINT16(m_pIndex[index] + calcMethodParamIndex(readUINT16(m_pIndex[index] + METHOD_OFFSET_PARAM_COUNT)));
#if defined(__COVERITY__)
__coverity_tainted_data_sanitize__(&aCount);
#endif
} catch (BlopObject::BoundsError &) {
SAL_WARN("registry", "bad data");
}
......
......@@ -531,6 +531,10 @@ sal_uInt32 findInMap(
return off;
}
#if defined(__COVERITY__)
extern "C" void __coverity_tainted_data_sanitize__(void *);
#endif
std::vector< OUString > readAnnotations(
bool annotated, rtl::Reference< MappedFile > const & file,
sal_uInt32 offset, sal_uInt32 * newOffset = nullptr)
......@@ -538,6 +542,9 @@ std::vector< OUString > readAnnotations(
std::vector< OUString > ans;
if (annotated) {
sal_uInt32 n = file->read32(offset);
#if defined(__COVERITY__)
__coverity_tainted_data_sanitize__(&n);
#endif
offset += 4;
for (sal_uInt32 i = 0; i != n; ++i) {
ans.push_back(file->readIdxString(&offset));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment