mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
hdmirx: Coverity defect cleanup:hdmi rx [1/1]
PD#SWPL-15167 Problem: Coverity defect cleanup:hdmi rx Solution: Modify code according to coverity Verify: verify on the board of x3011 Change-Id: I1f8bac51101a5ae1a8a27ffd14e899b75ab99c04 Signed-off-by: Zhengrong Zhu <zhengrong.zhu@amlogic.com>
This commit is contained in:
committed by
Jianxin Pan
parent
f5badaa803
commit
ee01dc30c3
@@ -3439,8 +3439,9 @@ unsigned char *compose_audio_db(uint8_t *aud_db, uint8_t *add_buf)
|
||||
/* copy ramin Short Audio Descriptors
|
||||
* in add_buf, except blk header
|
||||
*/
|
||||
if (idx + add_buf_len - 1 <= sizeof(com_aud))
|
||||
memcpy(com_aud + idx, tmp_buf + 1, add_buf_len - 1);
|
||||
if (idx < sizeof(com_aud))
|
||||
if (idx + add_buf_len - 1 <= sizeof(com_aud))
|
||||
memcpy(com_aud + idx, tmp_buf + 1, add_buf_len - 1);
|
||||
payload_len = (idx - 1) + (add_buf_len - 1);
|
||||
/* data blk header */
|
||||
com_aud[0] = (AUDIO_TAG << 5) | payload_len;
|
||||
|
||||
Reference in New Issue
Block a user