Possibility of Segmentation Fault on smbd/trans2.c
Michael B. Allen
mballen at erols.com
Tue Jan 16 10:23:40 GMT 2001
On Mon, Jan 15, 2001 at 07:16:21PM +0900, Kenichi Okuyama wrote:
> MBA> But hey, it works right. That seems to be the theme here :~)
>
> Maybe this is because we were running memcpy() even if length being
> 0. I thought it's implementation dependent about how memcpy() will
> work when given length is 0.
The length parameter of memcpy can in fact be zero. I would imagine that
it may also be NULL as NULL is defined by the c standard as a macro for
(void *)0 and therefore n > 0 will fail. I believe you are confusing
the fact that "If copying takes place between objects that overlap,
the behavior is undefined."
Mike
--
signature pending
More information about the samba-technical
mailing list