TT#108003 Do not let writing over capacity into medredis_srem_key_lua

Limit the amount we let be written into the buffer.

Change-Id: I4251352bc65c057b864d8dec80b5fed49f982566
Warned-by: coverity
mr9.3.1
Guillem Jover 6 years ago
parent 6c88ec582a
commit a69d5016ae

@ -446,7 +446,7 @@ int medredis_init() {
L_ERROR("Invalid reply from SCRIPT LOAD: %i/%lu\n", reply->type, (unsigned long) reply->len);
goto err;
}
strcpy(medredis_srem_key_lua, reply->str);
g_strlcpy(medredis_srem_key_lua, reply->str, sizeof(medredis_srem_key_lua));
medredis_free_reply(&reply);
L_DEBUG("Redis connection opened to %s:%d/%d\n",

Loading…
Cancel
Save