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