mirror of
https://github.com/Yubico/yubico-pam.git
synced 2025-02-22 00:54:30 +01:00
strdup() the OTP returned
This commit is contained in:
parent
9cdf8f76cd
commit
0b0c8d80aa
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <signal.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 = malloc(sizeof(struct pam_response));
|
||||||
reply->resp = test_get_data(appdata_ptr)->otp;
|
reply->resp = strdup(test_get_data(appdata_ptr)->otp);
|
||||||
*resp = reply;
|
*resp = reply;
|
||||||
return PAM_SUCCESS;
|
return PAM_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user