We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ce3bf7 commit fe64462Copy full SHA for fe64462
drivers/firmware/cirrus/test/cs_dsp_mock_bin.c
@@ -96,10 +96,11 @@ static void cs_dsp_mock_bin_add_name_or_info(struct cs_dsp_mock_bin_builder *bui
96
97
if (info_len % 4) {
98
/* Create a padded string with length a multiple of 4 */
99
+ size_t copy_len = info_len;
100
info_len = round_up(info_len, 4);
101
tmp = kunit_kzalloc(builder->test_priv->test, info_len, GFP_KERNEL);
102
KUNIT_ASSERT_NOT_ERR_OR_NULL(builder->test_priv->test, tmp);
- memcpy(tmp, info, info_len);
103
+ memcpy(tmp, info, copy_len);
104
info = tmp;
105
}
106
0 commit comments