chiark / gitweb /
@@ -4,8 +4,9 @@ debian_version_4_1_5
authorianmdlvl <ianmdlvl>
Sun, 13 Aug 2006 16:04:19 +0000 (16:04 +0000)
committerianmdlvl <ianmdlvl>
Sun, 13 Aug 2006 16:04:19 +0000 (16:04 +0000)
   * 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

cprogs/summer.c
debian/changelog

index 19c806987c18bf4d190382927acced0aa21c1e02..ada0f14830d35586401d803a442e3f56478aecec 100644 (file)
@@ -292,7 +292,6 @@ static void recurse(const char *path_or_buf) {
   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;
 
@@ -311,14 +310,14 @@ static void recurse(const char *path_or_buf) {
   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);
   }
index a1342bb708805b9dc0d8e81952904cba21906736..1e15d9047205350d22055cee5c8042ba244489c1 100644 (file)
@@ -4,8 +4,9 @@ chiark-utils (4.1.5) unstable; urgency=low
   * 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