[Gc] network data and libgc security/reliability

Christophe Meessen meessen at cppm.in2p3.fr
Mon May 7 02:49:37 PDT 2007


A few weeks ago I asked about the security of libgc when dealing with
data comming from the network. I was told that the only risk was a
memory leak. In fact this risk can be completely avoided by storing
network data into none inspected blocks.

In C++ one would allocate such blocks in this way

  short* data = new (PointerFreeGC) short[64*1024];

Adding this example and possible use case in the comment at the top of
the gc_cpp.h file could help users like me.

Adding C++ support for the following allocation calls could also be very

In fact I would need the later one for my buffers holding the PDUs and
the former for most classes I use. A gc base class variant would do the
job I guess.

More information about the Gc mailing list