1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-02-20 12:54:16 +01:00

strdup() the OTP returned

This commit is contained in:
Klas Lindfors 2015-01-21 08:58:30 +01:00
parent 9cdf8f76cd
commit 0b0c8d80aa

View File

@ -29,6 +29,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <signal.h>
@ -96,7 +97,7 @@ static int conv_func(int num_msg, const struct pam_message **msg,
}
reply = malloc(sizeof(struct pam_response));
reply->resp = test_get_data(appdata_ptr)->otp;
reply->resp = strdup(test_get_data(appdata_ptr)->otp);
*resp = reply;
return PAM_SUCCESS;
}