mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
venti/copy: fix bug writing directories that zero truncate
Found by nwf. TBR=rsc https://codereview.appspot.com/162860045
This commit is contained in:
parent
72197f89d4
commit
2763a6d832
2 changed files with 2 additions and 1 deletions
|
@ -37,6 +37,7 @@ Mathieu Lonjaret <lejatorn@gmail.com>
|
||||||
Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
|
Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
|
||||||
Michael Teichgräber <mt4swm@googlemail.com>
|
Michael Teichgräber <mt4swm@googlemail.com>
|
||||||
Michael Teichgräber <mt@ib.wmipf.de>
|
Michael Teichgräber <mt@ib.wmipf.de>
|
||||||
|
Nathaniel W Filardo <nwf@cs.jhu.edu> <nwfilardo@gmail.com>
|
||||||
Nikolai Saoukh <nikolai.saoukh@gmail.com>
|
Nikolai Saoukh <nikolai.saoukh@gmail.com>
|
||||||
Yuval Pavel Zholkover <paulzhol@gmail.com>
|
Yuval Pavel Zholkover <paulzhol@gmail.com>
|
||||||
Peter Saveliev <svinota.saveliev@gmail.com>
|
Peter Saveliev <svinota.saveliev@gmail.com>
|
||||||
|
|
|
@ -136,7 +136,7 @@ walk(uchar score[VtScoreSize], uint type, int base, int depth)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VtDirType:
|
case VtDirType:
|
||||||
for(i=0; i<n/VtEntrySize; i++){
|
for(i=0; i*VtEntrySize < n; i++){
|
||||||
if(vtentryunpack(&e, buf, i) < 0){
|
if(vtentryunpack(&e, buf, i) < 0){
|
||||||
fprint(2, "warning: could not unpack entry #%d in %V %d\n", i, score, type);
|
fprint(2, "warning: could not unpack entry #%d in %V %d\n", i, score, type);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue