Fix return case for negative namelen by jumping to normal exit processing
rather than immediately returning, or we may not unlock necessary locks. Noticed by: Mike Heffner <mheffner@acm.vt.edu>
This commit is contained in:
parent
deb0142560
commit
10845c31e4
@ -254,8 +254,10 @@ accept1(td, uap, compat)
|
||||
error = copyin(uap->anamelen, &namelen, sizeof (namelen));
|
||||
if(error)
|
||||
goto done2;
|
||||
if (namelen < 0)
|
||||
return (EINVAL);
|
||||
if (namelen < 0) {
|
||||
error = EINVAL;
|
||||
goto done2;
|
||||
}
|
||||
}
|
||||
error = fgetsock(td, uap->s, &head, &fflag);
|
||||
if (error)
|
||||
|
Loading…
x
Reference in New Issue
Block a user