[Bro] pcap_next Question

Vern Paxson vern at icir.org
Wed Aug 8 23:01:47 PDT 2012


>        block = new u_char[size];
>        if ( ! block )
>                 reporter->InternalError("out of memory");
> 
> 
> Since the new operator is throwing a std::bad_alloc error, that line
> should be surrounded with a bit of error handling like in the attached
> patch file.

I thought 'new' is defined to return a nil pointer upon memory exhaustion.
Is that wrong / dates me horribly?

		Vern



More information about the Bro mailing list