Boost logo

Boost :

From: Jim Douglas (jim_at_[hidden])
Date: 2006-01-30 04:54:31

Reece Dunn wrote:
> Normally, in C (or even some C++ code), you have constructs that look like
> this:
> char buffer[ 15 ];
> sprintf( buffer, "Some %s text", "verly long" );

No self-respecting coding standard would allow you to write the code
above. Rather it would insist that at least you wrote:

     snprintf( buffer, 15, "Some %s text", "verly long" );

Does that not solve the problem of overruns?


Boost list run by bdawes at, gregod at, cpdaniel at, john at