mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
OCC22305 XDE Xml reader does not check the version of xml file
This commit is contained in:
parent
1bd2fa6705
commit
4fbddc7c38
@ -236,6 +236,21 @@ void XmlLDrivers_DocumentRetrievalDriver::ReadFromDomDocument
|
|||||||
if(!aMsgDriver.IsNull())
|
if(!aMsgDriver.IsNull())
|
||||||
aMsgDriver->Write(aMsg.ToExtString());
|
aMsgDriver->Write(aMsg.ToExtString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// oan: OCC22305 - check a document verison and if it's greater than
|
||||||
|
// current version of storage driver set an error status and return
|
||||||
|
if( aCurDocVersion > XmlLDrivers::StorageVersion().IntegerValue() )
|
||||||
|
{
|
||||||
|
TCollection_ExtendedString aMsg =
|
||||||
|
TCollection_ExtendedString ("error: wrong file version: ") +
|
||||||
|
aDocVerStr + " while current is " +
|
||||||
|
XmlLDrivers::StorageVersion();
|
||||||
|
myReaderStatus = PCDM_RS_NoVersion;
|
||||||
|
if(!aMsgDriver.IsNull())
|
||||||
|
aMsgDriver->Write(aMsg.ToExtString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( aCurDocVersion < 2) aCurDocVersion = 2;
|
if( aCurDocVersion < 2) aCurDocVersion = 2;
|
||||||
|
|
||||||
PropagateDocumentVersion(aCurDocVersion);
|
PropagateDocumentVersion(aCurDocVersion);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user