tracy/server/TracyFileHeader.hpp
Bartosz Taudul 764792d8db Try to not crash when opening invalid files.
Tracy will now perform a number of checks when trying to read a dump
file:
1. The file must have at least 4 bytes of data.
2. There should be a 4 byte header to indicate the file was saved by
   tracy. This is a breaking change in file format.
3. Old header-less files are still supported, but there's a new check
   for data validity. The first 4 bytes of file (as an uint32) must be
   less or equal to max LZ4 data packet size. This requires the first
   two bytes to be 00 00 or 00 01, which should catch most invalid
   files.
2018-04-21 14:53:40 +02:00

12 lines
150 B
C++

#ifndef __TRACYFILEHEADER_HPP__
#define __TRACYFILEHEADER_HPP__
namespace tracy
{
static const char Lz4Header[4] = { 't', 'l', 'Z', 4 };
}
#endif