CVS update: samba/source/locking

abartlet at samba.org abartlet at samba.org
Mon Feb 24 12:13:31 EST 2003


Date:	Mon Feb 24 01:13:31 2003
Author:	abartlet

Update of /data/cvs/samba/source/locking
In directory dp.samba.org:/tmp/cvs-serv8831/locking

Modified Files:
	locking.c 
Log Message:
Fix 2 off-by-one bugs in the use of malloc()ed strings and safe_strcpy().

safe_strcpy() isn't particularly safe (this has been noted before) as it does
not take the size of the buffer, but instead the size of the buffer *minus 1*

The locking.c fix was causing segfaults on machines running with 
--enable-developer, and was tracked down thanks to the fact that vance's build
farm machine runs with such an option, and smbtorture's DIR1 test hits this
bug very well.

(The --enable-developer code writes to the last byte of the string, to check
for incorrect use of safe_strcpy()).

Andrew Bartlett


Revisions:
locking.c		1.140 => 1.141
	http://www.samba.org/cgi-bin/cvsweb/samba/source/locking/locking.c?r1=1.140&r2=1.141


More information about the samba-cvs mailing list