dv: add compatibility to prevent panic [1/1]

PD#SWPL-3889

Problem:
when the metadata parsed by decode is error, the array will overflow
in dv module.

Solution:
dolby type just appears once in metadata. After parsing dolby type,
breaking the circulation directly.

Verify:
U212

Change-Id: I715e28c1b9a8aab2fcb4059dd132b5b98c043f31
Signed-off-by: Yi Zhou <yi.zhou@amlogic.com>
This commit is contained in:
Yi Zhou
2019-01-08 09:24:45 +08:00
committed by Dongjin Kim
parent 15f294f87f
commit 0b10161853

View File

@@ -3757,7 +3757,6 @@ static int parse_sei_and_meta(
|| (req->aux_size == 0))
return 1;
p = req->aux_buf;
while (p < req->aux_buf + req->aux_size - 8) {
size = *p++;
@@ -3859,6 +3858,11 @@ static int parse_sei_and_meta(
ret = 2;
break;
}
/*dolby type just appears once in metadata
*after parsing dolby type,breaking the
*circulation directly
*/
break;
}
p += size;
}