set errstr for bad dir contents
This commit is contained in:
parent
5c419e0741
commit
f53117fb6b
@ -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…
Reference in New Issue
Block a user