Skip to content
Snippets Groups Projects
Commit 8e9405ac authored by Miroslav Saur's avatar Miroslav Saur
Browse files

Merge branch 'sponce_fixRawbankReading' into '2024-patches'

Check magic bytes in banks and fails in case of corruption

See merge request !4750
parents 9f18ebca 9856f9ad
No related branches found
No related tags found
2 merge requests!4755Synchronize master branch with 2024-patches,!4750Check magic bytes in banks and fails in case of corruption
Pipeline #8473275 passed
......@@ -262,6 +262,13 @@ StatusCode RawDataCnvSvc::fillObjRefs( IOpaqueAddress* pA, DataObject* pObj ) {
char * start = dat.first, *end = start + dat.second;
while ( start < end ) {
auto b = (RawBank*)start;
// check for possible corruption of the RawBank
if ( b->magic() != RawBank::MagicPattern ) {
throw GaudiException( "Bad magic pattern in Tell1 bank", "MDF::Buffer", StatusCode::FAILURE );
}
if ( b->totalSize() < b->hdrSize() ) {
throw GaudiException( "Raw bank size smaller than minimum", "MDF::Buffer", StatusCode::FAILURE );
}
if ( b->type() == RawBank::DstAddress ) {
// cout << "Reg:" << pReg->identifier() << " " << m_dstLocation << endl;
StatusCode sc = StatusCode::FAILURE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment