hdcp: fix buffer overflow in stream gen

Bug: 323964895
Change-Id: I99f1411764fba00fdfe3d08bbdc6dfd5d30d9c8d
Signed-off-by: Ji Soo Shin <jisshin@google.com>
(cherry picked from commit 16a8149b3e0f1ef388abf2b3e38516a0a17bcdfe)
diff --git a/teeif.c b/teeif.c
index f439b02..d7d6abf 100644
--- a/teeif.c
+++ b/teeif.c
@@ -571,7 +571,7 @@
 
 	memcpy(seq_num_m, hci->genstrminfo.seq_num_m, HDCP_RP_SEQ_NUM_M_LEN);
 	memcpy(k, hci->genstrminfo.k, HDCP_RP_K_LEN);
-	memcpy(streamid_type, hci->genstrminfo.streamid_type, HDCP_RP_STREAMID_TYPE_LEN);
+	memcpy(streamid_type, hci->genstrminfo.streamid_type, HDCP_RP_MAX_STREAMID_TYPE_LEN);
 
 	/* check returned message from SWD */
 
diff --git a/teeif.h b/teeif.h
index 2e04ea3..fb26f7a 100644
--- a/teeif.h
+++ b/teeif.h
@@ -215,7 +215,7 @@
 	uint8_t streamid[HDCP_RP_MAX_STREAMID_NUM];
 	uint8_t seq_num_m[HDCP_RP_SEQ_NUM_M_LEN];
 	uint8_t k[HDCP_RP_K_LEN];
-	uint8_t streamid_type[HDCP_RP_STREAMID_TYPE_LEN];
+	uint8_t streamid_type[HDCP_RP_MAX_STREAMID_TYPE_LEN];
 } hci_genstreaminfo_t;
 
 typedef struct {