[Logs] Fix buffer overflow causing segfault in media parsing code
(cherry picked from commit e2619493b1d39e3839e0133c000cbbffd043ea59)
(cherry picked from commit 109a2dff4702eb1385a00ac79cc963f35acc390f)