[Libsysio-commit] HEAD: libsysio/src getdirentries.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2007-11-15 15:05:39
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11638 Modified Files: getdirentries.c Log Message: The getdirentries function was converted to blindly convert the 64-bit directory entry structure. When the native format is the same layout this resulted in a memcpy of the name in overlapping regions. That's a no-no. Changed, now, to use memmove, which allows overlapping copies. Index: getdirentries.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/getdirentries.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -w -b -B -p -r1.25 -r1.26 --- getdirentries.c 2 Jul 2007 18:58:16 -0000 1.25 +++ getdirentries.c 15 Nov 2007 15:05:34 -0000 1.26 @@ -182,7 +182,7 @@ SYSIO_INTERFACE_NAME(getdirentries)(int /* * Copy name first. */ - (void )memcpy(dp->d_name, d64p->d_name, n); + (void )memmove(dp->d_name, d64p->d_name, n); /* * Then, the rest. */ |