strncpy doesn't return size_t (#1296)

follow up to https://github.com/coturn/coturn/pull/1282/files
This commit is contained in:
Richard Russo 2023-11-05 17:48:32 -08:00 committed by GitHub
parent 20c8d86a34
commit 4bc872b663
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1968,7 +1968,7 @@ int stun_check_message_integrity_str(turn_credential_type ct, uint8_t *buf, size
password_t pwd;
if (ct == TURN_CREDENTIALS_SHORT_TERM) {
len = strncpy((char *)pwd, (const char *)upwd, sizeof(password_t) - 1);
strncpy((char *)pwd, (const char *)upwd, sizeof(password_t) - 1);
pwd[sizeof(password_t) - 1] = 0;
} else if (stun_produce_integrity_key_str(uname, realm, upwd, key, shatype) < 0) {
return -1;