mirror of
https://github.com/Yubico/yubico-pam.git
synced 2025-02-12 06:54:21 +01:00
move around to avoid warning
This commit is contained in:
parent
16a4dc768b
commit
2f69fb99e5
2
util.c
2
util.c
@ -216,8 +216,8 @@ get_user_challenge_file(YK_KEY *yk, const char *chalresp_path, const char *usern
|
|||||||
/* 0xffffffff == 4294967295 == 10 digits */
|
/* 0xffffffff == 4294967295 == 10 digits */
|
||||||
len = strlen(chalresp_path == NULL ? "challenge" : username) + 1 + 10 + 1;
|
len = strlen(chalresp_path == NULL ? "challenge" : username) + 1 + 10 + 1;
|
||||||
if ((filename = malloc(len)) != NULL) {
|
if ((filename = malloc(len)) != NULL) {
|
||||||
filename_malloced = 1;
|
|
||||||
int res = snprintf(filename, len, "%s-%i", chalresp_path == NULL ? "challenge" : username, serial);
|
int res = snprintf(filename, len, "%s-%i", chalresp_path == NULL ? "challenge" : username, serial);
|
||||||
|
filename_malloced = 1;
|
||||||
if (res < 0 || res > len) {
|
if (res < 0 || res > len) {
|
||||||
/* Not enough space, strangely enough. */
|
/* Not enough space, strangely enough. */
|
||||||
filename = NULL;
|
filename = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user