#include #include #include #include #include #include #include int main( int argc, char * argv[] ) { (void)argc; #ifdef __AFL_HAVE_MANUAL_CONTROL __AFL_INIT(); #endif FILE *file = fopen( argv[1], "rb" ); std::vector> *prev = nullptr; while(!feof(file)) { try { int32_t val = 0; fread(&val, 1, 1, file); if(!val) { delete prev; prev=nullptr; } //printf("allocating %d\n", val&3); fread(&val, val & 3, 1, file); prev=new std::vector>(val); }catch(std::bad_alloc&) { break; } } fclose( file ); return 0; }