set errstr for bad dir contents

This commit is contained in:
rsc 2006-06-26 00:06:28 +00:00
parent 5c419e0741
commit f53117fb6b

View file

@ -90,8 +90,11 @@ fsdirreadall(CFid *fid, Dir **d)
break; break;
ts += n; ts += n;
} }
if(ts >= 0) if(ts >= 0){
ts = dirpackage(buf, ts, d); ts = dirpackage(buf, ts, d);
if(ts < 0)
werrstr("malformed directory contents");
}
free(buf); free(buf);
if(ts == 0 && n < 0) if(ts == 0 && n < 0)
return -1; return -1;