Closed GoogleCodeExporter closed 9 years ago
open-vcdiff version 0.5 fixes this bug by defining a private copy constructor,
causing a compiler error to appear if the code attempts to copy a
HashedDictionary
object. Using the double_free_hd.cc example from the bug description, the
following
output appears:
$ g++ double_free_hd.cc -lvcdenc -o double_free_hd
/usr/local/include/google/vcencoder.h: In function 'int main()':
/usr/local/include/google/vcencoder.h:88: error:
'open_vcdiff::HashedDictionary::HashedDictionary(const
open_vcdiff::HashedDictionary&)' is private
double_free_hd.cc:6: error: within this context
This protects against the memory being freed twice and causing a crash at
runtime.
Original comment by openvcd...@gmail.com
on 20 Mar 2009 at 10:10
Original issue reported on code.google.com by
openvcd...@gmail.com
on 18 Sep 2008 at 7:52