URI: 
       tventi/copy: fix bug writing directories that zero truncate - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 2763a6d8324fc5e1296e9a50a067ec04d52c581f
   DIR parent 72197f89d47444e3c62e1aa0df8bd7059c29104d
  HTML Author: Russ Cox <rsc@swtch.com>
       Date:   Tue, 21 Oct 2014 07:25:13 -0400
       
       venti/copy: fix bug writing directories that zero truncate
       
       Found by nwf.
       
       TBR=rsc
       https://codereview.appspot.com/162860045
       
       Diffstat:
         M CONTRIBUTORS                        |       1 +
         M src/cmd/venti/copy.c                |       2 +-
       
       2 files changed, 2 insertions(+), 1 deletion(-)
       ---
   DIR diff --git a/CONTRIBUTORS b/CONTRIBUTORS
       t@@ -37,6 +37,7 @@ Mathieu Lonjaret <lejatorn@gmail.com>
        Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
        Michael Teichgräber <mt4swm@googlemail.com>
        Michael Teichgräber <mt@ib.wmipf.de>
       +Nathaniel W Filardo <nwf@cs.jhu.edu> <nwfilardo@gmail.com>
        Nikolai Saoukh <nikolai.saoukh@gmail.com>
        Yuval Pavel Zholkover <paulzhol@gmail.com>
        Peter Saveliev <svinota.saveliev@gmail.com>
   DIR diff --git a/src/cmd/venti/copy.c b/src/cmd/venti/copy.c
       t@@ -136,7 +136,7 @@ walk(uchar score[VtScoreSize], uint type, int base, int depth)
                        break;
        
                case VtDirType:
       -                for(i=0; i<n/VtEntrySize; i++){
       +                for(i=0; i*VtEntrySize < n; i++){
                                if(vtentryunpack(&e, buf, i) < 0){
                                        fprint(2, "warning: could not unpack entry #%d in %V %d\n", i, score, type);
                                        continue;