diff
35 	build_lbl_len = edl->data[0];
36 	if (build_lbl_len <= QCA_FW_BUILD_VER_LEN - 1) {
- 		memcpy(build_label, edl->data + 1, build_lbl_len);
+ 		if (memcpy_s(build_label, QCA_FW_BUILD_VER_LEN, edl->data + 1, build_lbl_len) != 0) {
+ 			bt_dev_err(hdev, "Build label copy failed");
+ 			err = -EINVAL;
+ 			goto out;
+ 		}
+ 		build_label[build_lbl_len] = '\0';
