==29053== Invalid read of size 1 ==29053== at 0x404491: find_nal_unit(unsigned char const*, int, int*, int*) (parcat.cpp:142) ==29053== by 0x40485D: filter_segment(std::vector > const&, int, int*, int*) (parcat.cpp:280) ==29053== by 0x404F7C: process_segment(char const*, int, int*, int*) (parcat.cpp:410) ==29053== by 0x4050E7: main (parcat.cpp:432) ==29053== Address 0x5b3570c is 0 bytes after a block of size 402,796 alloc'd ==29053== at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==29053== by 0x406D1D: __gnu_cxx::new_allocator::allocate(unsigned long, void const*) (new_allocator.h:104) ==29053== by 0x40674A: std::allocator_traits >::allocate(std::allocator&, unsigned long) (alloc_traits.h:491) ==29053== by 0x405D25: std::_Vector_base >::_M_allocate(unsigned long) (stl_vector.h:170) ==29053== by 0x4066A6: std::_Vector_base >::_M_create_storage(unsigned long) (stl_vector.h:185) ==29053== by 0x405BEE: std::_Vector_base >::_Vector_base(unsigned long, std::allocator const&) (stl_vector.h:136) ==29053== by 0x4056BB: std::vector >::vector(unsigned long, std::allocator const&) (stl_vector.h:278) ==29053== by 0x404EE4: process_segment(char const*, int, int*, int*) (parcat.cpp:399) ==29053== by 0x4050E7: main (parcat.cpp:432) ==29053==