==28811== Memcheck, a memory error detector ==28811== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==28811== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==28811== Command: ./sll_client ==28811== Parent PID: 26156 ==28811== ==28811== Invalid read of size 4 ==28811== at 0x407CB3: RCFour::Process(std::string&) (RCFour.cpp:71) ==28811== by 0x407A9B: RCFour::Encipher(std::string&) (RCFour.cpp:46) ==28811== by 0x40ED54: Crypto::Encipher(std::string&) (crypto.cpp:61) ==28811== by 0x40969E: main (simple_client_main.cpp:208) ==28811== Address 0x5c00d4c is 3 bytes after a block of size 153 free'd ==28811== at 0x4C27FFF: operator delete(void*) (vg_replace_malloc.c:387) ==28811== by 0x4ECCD2D: std::string::reserve(unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14) ==28811== by 0x4ECCD74: std::string::push_back(char) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14) ==28811== by 0x407BCE: RCFour::Process(std::string&) (RCFour.cpp:63) ==28811== by 0x407A9B: RCFour::Encipher(std::string&) (RCFour.cpp:46) ==28811== by 0x40ED54: Crypto::Encipher(std::string&) (crypto.cpp:61) ==28811== by 0x40969E: main (simple_client_main.cpp:208) ==28811== ==28811== Invalid write of size 4 ==28811== at 0x407CD7: RCFour::Process(std::string&) (RCFour.cpp:72) ==28811== by 0x407A9B: RCFour::Encipher(std::string&) (RCFour.cpp:46) ==28811== by 0x40ED54: Crypto::Encipher(std::string&) (crypto.cpp:61) ==28811== by 0x40969E: main (simple_client_main.cpp:208) ==28811== Address 0x5c00d4c is 3 bytes after a block of size 153 free'd ==28811== at 0x4C27FFF: operator delete(void*) (vg_replace_malloc.c:387) ==28811== by 0x4ECCD2D: std::string::reserve(unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14) ==28811== by 0x4ECCD74: std::string::push_back(char) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14) ==28811== by 0x407BCE: RCFour::Process(std::string&) (RCFour.cpp:63) ==28811== by 0x407A9B: RCFour::Encipher(std::string&) (RCFour.cpp:46) ==28811== by 0x40ED54: Crypto::Encipher(std::string&) (crypto.cpp:61) ==28811== by 0x40969E: main (simple_client_main.cpp:208) ==28811== ==28811== Invalid read of size 4 ==28811== at 0x407CB3: RCFour::Process(std::string&) (RCFour.cpp:71) ==28811== by 0x407AD3: RCFour::Decipher(std::string&) (RCFour.cpp:50) ==28811== by 0x40EF12: Crypto::Decipher(std::string&) (crypto.cpp:80) ==28811== by 0x409714: main (simple_client_main.cpp:212) ==28811== Address 0x5c00d4c is 3 bytes after a block of size 153 free'd ==28811== at 0x4C27FFF: operator delete(void*) (vg_replace_malloc.c:387) ==28811== by 0x4ECCD2D: std::string::reserve(unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14) ==28811== by 0x4ECCD74: std::string::push_back(char) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14) ==28811== by 0x407BCE: RCFour::Process(std::string&) (RCFour.cpp:63) ==28811== by 0x407A9B: RCFour::Encipher(std::string&) (RCFour.cpp:46) ==28811== by 0x40ED54: Crypto::Encipher(std::string&) (crypto.cpp:61) ==28811== by 0x40969E: main (simple_client_main.cpp:208) ==28811== ==28811== Invalid write of size 4 ==28811== at 0x407CD7: RCFour::Process(std::string&) (RCFour.cpp:72) ==28811== by 0x407AD3: RCFour::Decipher(std::string&) (RCFour.cpp:50) ==28811== by 0x40EF12: Crypto::Decipher(std::string&) (crypto.cpp:80) ==28811== by 0x409714: main (simple_client_main.cpp:212) ==28811== Address 0x5c00d4c is 3 bytes after a block of size 153 free'd ==28811== at 0x4C27FFF: operator delete(void*) (vg_replace_malloc.c:387) ==28811== by 0x4ECCD2D: std::string::reserve(unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14) ==28811== by 0x4ECCD74: std::string::push_back(char) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.14) ==28811== by 0x407BCE: RCFour::Process(std::string&) (RCFour.cpp:63) ==28811== by 0x407A9B: RCFour::Encipher(std::string&) (RCFour.cpp:46) ==28811== by 0x40ED54: Crypto::Encipher(std::string&) (crypto.cpp:61) ==28811== by 0x40969E: main (simple_client_main.cpp:208) ==28811== ==28811== ==28811== HEAP SUMMARY: ==28811== in use at exit: 2,128 bytes in 4 blocks ==28811== total heap usage: 16,737 allocs, 16,733 frees, 1,659,287 bytes allocated ==28811== ==28811== 16 bytes in 1 blocks are definitely lost in loss record 1 of 4 ==28811== at 0x4C28B42: operator new(unsigned long) (vg_replace_malloc.c:261) ==28811== by 0x4060D3: __gnu_cxx::new_allocator::allocate(unsigned long, void const*) (new_allocator.h:89) ==28811== by 0x405CBA: std::_Vector_base >::_M_allocate(unsigned long) (in /host/git/cr_sll_client/Debug/sll_client) ==28811== by 0x4058ED: int* std::vector >::_M_allocate_and_copy<__gnu_cxx::__normal_iterator > > >(unsigned long, __gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >) (stl_vector.h:967) ==28811== by 0x40516C: std::vector >::operator=(std::vector > const&) (vector.tcc:165) ==28811== by 0x407A69: RCFour::SetKey(std::vector >&) (RCFour.cpp:41) ==28811== by 0x407994: RCFour::RCFour(std::vector >&) (RCFour.cpp:34) ==28811== by 0x40E9E9: Crypto::SetModeRCFour(std::string&) (crypto.cpp:23) ==28811== by 0x4089F6: main (simple_client_main.cpp:114) ==28811== ==28811== 64 bytes in 1 blocks are definitely lost in loss record 2 of 4 ==28811== at 0x4C28B42: operator new(unsigned long) (vg_replace_malloc.c:261) ==28811== by 0x4060D3: __gnu_cxx::new_allocator::allocate(unsigned long, void const*) (new_allocator.h:89) ==28811== by 0x405CBA: std::_Vector_base >::_M_allocate(unsigned long) (in /host/git/cr_sll_client/Debug/sll_client) ==28811== by 0x4058ED: int* std::vector >::_M_allocate_and_copy<__gnu_cxx::__normal_iterator > > >(unsigned long, __gnu_cxx::__normal_iterator > >, __gnu_cxx::__normal_iterator > >) (stl_vector.h:967) ==28811== by 0x40516C: std::vector >::operator=(std::vector > const&) (vector.tcc:165) ==28811== by 0x407A69: RCFour::SetKey(std::vector >&) (RCFour.cpp:41) ==28811== by 0x407994: RCFour::RCFour(std::vector >&) (RCFour.cpp:34) ==28811== by 0x40E9E9: Crypto::SetModeRCFour(std::string&) (crypto.cpp:23) ==28811== by 0x409512: main (simple_client_main.cpp:191) ==28811== ==28811== 1,024 bytes in 1 blocks are definitely lost in loss record 3 of 4 ==28811== at 0x4C28B42: operator new(unsigned long) (vg_replace_malloc.c:261) ==28811== by 0x4060D3: __gnu_cxx::new_allocator::allocate(unsigned long, void const*) (new_allocator.h:89) ==28811== by 0x405CBA: std::_Vector_base >::_M_allocate(unsigned long) (in /host/git/cr_sll_client/Debug/sll_client) ==28811== by 0x40557A: std::vector >::_M_insert_aux(__gnu_cxx::__normal_iterator > >, int const&) (vector.tcc:322) ==28811== by 0x40508B: std::vector >::push_back(int const&) (stl_vector.h:749) ==28811== by 0x407B70: RCFour::Process(std::string&) (RCFour.cpp:62) ==28811== by 0x407A9B: RCFour::Encipher(std::string&) (RCFour.cpp:46) ==28811== by 0x40ED54: Crypto::Encipher(std::string&) (crypto.cpp:61) ==28811== by 0x408A44: main (simple_client_main.cpp:116) ==28811== ==28811== 1,024 bytes in 1 blocks are definitely lost in loss record 4 of 4 ==28811== at 0x4C28B42: operator new(unsigned long) (vg_replace_malloc.c:261) ==28811== by 0x4060D3: __gnu_cxx::new_allocator::allocate(unsigned long, void const*) (new_allocator.h:89) ==28811== by 0x405CBA: std::_Vector_base >::_M_allocate(unsigned long) (in /host/git/cr_sll_client/Debug/sll_client) ==28811== by 0x40557A: std::vector >::_M_insert_aux(__gnu_cxx::__normal_iterator > >, int const&) (vector.tcc:322) ==28811== by 0x40508B: std::vector >::push_back(int const&) (stl_vector.h:749) ==28811== by 0x407B70: RCFour::Process(std::string&) (RCFour.cpp:62) ==28811== by 0x407A9B: RCFour::Encipher(std::string&) (RCFour.cpp:46) ==28811== by 0x40ED54: Crypto::Encipher(std::string&) (crypto.cpp:61) ==28811== by 0x40969E: main (simple_client_main.cpp:208) ==28811== ==28811== LEAK SUMMARY: ==28811== definitely lost: 2,128 bytes in 4 blocks ==28811== indirectly lost: 0 bytes in 0 blocks ==28811== possibly lost: 0 bytes in 0 blocks ==28811== still reachable: 0 bytes in 0 blocks ==28811== suppressed: 0 bytes in 0 blocks ==28811== ==28811== For counts of detected and suppressed errors, rerun with: -v ==28811== ERROR SUMMARY: 48 errors from 8 contexts (suppressed: 4 from 4)