libauthsrv: fix _asgetresp() for passwd
This commit is contained in:
parent
3bb0b9f4ea
commit
d52e35055d
1 changed files with 5 additions and 2 deletions
|
@ -8,11 +8,14 @@ _asgetresp(int fd, Ticket *t, Authenticator *a, Authkey *k)
|
|||
char tbuf[TICKETLEN+AUTHENTLEN];
|
||||
int n, m;
|
||||
|
||||
m = TICKETLEN;
|
||||
memset(t, 0, sizeof(Ticket));
|
||||
if(a != nil)
|
||||
if(a != nil){
|
||||
m += AUTHENTLEN;
|
||||
memset(a, 0, sizeof(Authenticator));
|
||||
}
|
||||
|
||||
n = _asrdresp(fd, tbuf, sizeof(tbuf));
|
||||
n = _asrdresp(fd, tbuf, m);
|
||||
if(n <= 0)
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue