$include_dir="/home/hyper-archives/boost-build/include"; include("$include_dir/msg-header.inc") ?>
From: Alex Besogonov (cyberax_at_[hidden])
Date: 2006-06-05 14:42:50
goodmen wrote:
> so ,I think it must to write like this to avoid buffer overrun.
> void lol_add(
> LOL *lol,
> LIST *l )
> {
> if( lol->count < LOL_MAX-1/*Note here!!*/ )
> lol->list[ lol->count++ ] = l;
> }
> Are there anyone agree with me ?
What's wrong with this code?
lol->count++ is postincrement, so there's no chance to write out of
buffer bounds.
-- With respect, Alex Besogonov (cyberax_at_[hidden])