Fixed null pointer exception for dirs 1> than the greatest index

This commit is contained in:
Kris Maglione 2006-06-10 16:47:59 -04:00
parent 550f47230b
commit 918815c6d5

View File

@ -386,7 +386,7 @@ qid_of_name(PackedQid wqid[IXP_MAX_WELEM], unsigned short qsel, char *name)
if(sscanf(name, "%d", &i) != 1)
return nil;
for(f=a->frame; f && i; f=f->anext, i--);
if(i)
if(!f)
return nil;
new.i3id= f->id;
}
@ -398,7 +398,7 @@ qid_of_name(PackedQid wqid[IXP_MAX_WELEM], unsigned short qsel, char *name)
if(sscanf(name, "%d", &i) != 1)
return nil;
for(c=client; i && c; c=c->next, i--);
if(i)
if(!c)
return nil;
new.type= IXP_QTDIR;
new.ptype= FsDGclient;