Fix coverity issues

This commit is contained in:
heckflosse
2018-11-20 14:42:39 +01:00
parent 61d8a4f254
commit 1cdd814e1b
3 changed files with 9 additions and 6 deletions

View File

@@ -760,12 +760,13 @@ void XMLCALL rtengine::LCPProfile::XmlStartHandler(void* pLCPProfile, const char
++src;
}
strcpy(pProf->lastTag, src);
strncpy(pProf->lastTag, src, sizeof(pProf->lastTag) - 1);
pProf->lastTag[sizeof(pProf->lastTag) - 1] = 0;
const std::string src_str = src;
if (src_str == "VignetteModelPiecewiseParam") {
strcpy(pProf->inInvalidTag, src);
strncpy(pProf->inInvalidTag, src, sizeof(pProf->inInvalidTag) - 1);
pProf->inInvalidTag[sizeof(pProf->inInvalidTag) - 1] = 0;
}
if (src_str == "CameraProfiles") {