[Asterisk-Dev] Re: [RFC] strncpy -> ast_copy_string
Tony Mountifield
tony at softins.clara.co.uk
Mon May 2 10:12:42 MST 2005
In article <20050502164054.92481.qmail at web52409.mail.yahoo.com>,
Ledion B <tekixhunga at yahoo.com> wrote:
>
> >n will _always_ be greater than strlen(src), at least
> >99.99% of the cases. We are copying strings into
> >fixed-size buffers that always have enough room.
>
> I was worrying about this being the case. So I did a
> real quick scan through the *'s code and yes indeed
> that is the case, that most of the time strncpy is
> called with the size of the destination buffer.
That is the whole purpose of the third argument to strncpy() !!!
Cheers
Tony
--
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org
More information about the asterisk-dev
mailing list