[Logs] Fix buffer overflow causing segfault in media parsing code