set errstr for bad dir contents
This commit is contained in:
parent
5c419e0741
commit
f53117fb6b
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue