// Check that the header is sane, that is the size does not go past the buffer.
// Otherwise try again at the next word location.
- if (fHeader->fSize == 0 or fPosition+fCount+fHeader->fSize > fBufferSize) {
+ if ( ( (fHeader->fSize == 0) ||
+ ((Int_t)fPosition + fCount + (Int_t)fHeader->fSize > (Int_t)fBufferSize ) )
+ && fHeader->fSize != 0xFFFFFFFF) {
+
if (fPosition + sizeof(UInt_t) <= fBufferSize) {
fPosition += sizeof(UInt_t);
continue;
if (fHeader->fSize != 0xFFFFFFFF) {
fCount = fHeader->fSize - sizeof(AliRawDataHeader);
} else {
- fCount = fBufferSize - fPosition - sizeof(AliRawDataHeader);
+ fCount = fBufferSize - sizeof(AliRawDataHeader);
}
} while (!IsSelected());
virtual UInt_t GetGDCId() const {return 0;};
virtual UInt_t GetTimestamp() const {return 0;};
- virtual Int_t GetEquipmentSize() const {return 0;};
+ virtual Int_t GetEquipmentSize() const {return fBufferSize;};
virtual Int_t GetEquipmentType() const {return 0;};
virtual Int_t GetEquipmentId() const {return fEquipmentId;};
virtual const UInt_t* GetEquipmentAttributes() const {return NULL;};
};
#endif
+