static int buf_allocd;
struct dirent **namelist, *const *de;
- char *subpathp;
const char *path_or_0= path_or_buf==buf ? 0 : path_or_buf;
int nentries, pathl, esave, buf_want, i;
if (path_or_0) strcpy(buf,path_or_0);
buf[pathl]= '/';
- subpathp= buf+pathl+1;
+ pathl++;
if (nentries < 0) {
- strcpy(subpathp,"\\?"); errno= esave;
+ strcpy(buf+pathl,"\\?"); errno= esave;
problem_e(buf,-1,"scandir failed");
return;
}
for (i=0, de=namelist; i<nentries; i++, de++) {
- strcpy(subpathp, (*de)->d_name);
+ strcpy(buf+pathl, (*de)->d_name);
node(buf);
free(*de);
}
* backup/snaprsync: allow setting of program to use for summer; allow
setting of rsync options; allow settings to be set to empty strings on
the command line; do not fail if localprevious,rsums is missing.
+ * cprogs/summer.c: properly fix for reentrancy of buf.
- --
+ -- Ian Jackson <ian@davenant.greenend.org.uk> Sun, 13 Aug 2006 17:04:08 +0100
chiark-utils (4.1.4) unstable; urgency=low