Don't forget to clear the buffer before reusing it.

This commit is contained in:
Dag-Erling Smørgrav 2002-07-10 23:04:07 +00:00
parent 83587634ec
commit 645ca8e839

View File

@ -785,6 +785,7 @@ mm_answer_pam_query(int socket, Buffer *m)
ret = (pam_device.query)(pam_ctxt, &name, &info, &num, &prompts, &echo_on);
if (num > 1 || name == NULL || info == NULL)
ret = -1;
buffer_clear(m);
buffer_put_int(m, ret);
buffer_put_cstring(m, name);
xfree(name);