Do I understand it correctly? diff --git a/libauthsrv/convM2A.c b/libauthsrv/convM2A.c index 0da7865..5f7bd2f 100644 --- a/libauthsrv/convM2A.c +++ b/libauthsrv/convM2A.c @@ -23,7 +23,7 @@ convM2A(char *ap, int n, Authenticator *f, Ticket *t) return -m; memmove(buf, ap, m); if(form1M2B((char*)buf, m, t->key) < 0) - return m; + return -m; } p = buf; f->num = *p++;
no. negative means the amount of bytes expected. in this case, we got the right amount of bytes, but authentication fails, so we wont put the message type and the caller will reject the authenticator. -- cinap