libdvr :Dtvkitserver crashes when recording DTV programs
PD#TV-65956
Problem:
Dtvkitserver crashes when recording DTV programs
Solution:
dvr_segment_del_by_location interface cmd command definition length is not enough, the sprintf memory is out of bounds, expand the cmd data length
Verify:
androidR-redi test pass at project
Change-Id: I64c77641aa3e074ce29bf58049e12df81be6f3e5
diff --git a/src/dvr_segment.c b/src/dvr_segment.c
index f536071..e0f0967 100644
--- a/src/dvr_segment.c
+++ b/src/dvr_segment.c
@@ -65,7 +65,7 @@
int dvr_segment_del_by_location(const char *location)
{
FILE *fp;
- char cmd[DVR_MAX_LOCATION_SIZE + 64];
+ char cmd[DVR_MAX_LOCATION_SIZE * 2 + 64];
DVR_RETURN_IF_FALSE(location);