mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/win32-vd_agent
synced 2025-12-26 21:37:53 +00:00
Replace sscanf_s by sscanf
The _s functions need a recent msvcrt version, not shipped in XP by default. Furthermore, it appears that their sscanf_s usage was missing the extra buffer size argument.
This commit is contained in:
parent
5129f33899
commit
492ee05a6b
@ -182,7 +182,7 @@ bool FileXfer::g_key_get_string(char* data, const char* group, const char* key,
|
||||
next_group_pos = strstr(group_pos + strlen(group_pfx), "[");
|
||||
if (next_group_pos && key_pos > next_group_pos) return false;
|
||||
|
||||
return !!sscanf_s(key_pos + strlen(key_pfx), "%s\n", value);
|
||||
return !!sscanf(key_pos + strlen(key_pfx), "%s\n", value);
|
||||
}
|
||||
|
||||
bool FileXfer::g_key_get_uint64(char* data, const char* group, const char* key, uint64_t* value)
|
||||
@ -190,5 +190,5 @@ bool FileXfer::g_key_get_uint64(char* data, const char* group, const char* key,
|
||||
char str[G_KEY_MAX_LEN];
|
||||
|
||||
if (!g_key_get_string(data, group, key, str)) return false;
|
||||
return !!sscanf_s(str, "%llu", value);
|
||||
return !!sscanf(str, "%" PRIu64, value);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user