From de6e64701272d4e4f3c613f4817a6613558fb2cf Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 21 Feb 2004 18:55:42 +0000 Subject: [PATCH] Allocate space for the extra_data because it's freed later. --- ChangeLog | 2 ++ src/input/r_real.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 777778750..139410e08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2004-02-21 Moritz Bunkus + * mkvmerge: bug fix: segfault in the RealMedia reader. + * mmg: bug fix: When adding a Matroska file that contains a track name or a title with non-ASCII characters those would be displayed as UTF-8 in the appropriate input boxes. This has been changed, diff --git a/src/input/r_real.cpp b/src/input/r_real.cpp index fbd771845..1abd7c00b 100644 --- a/src/input/r_real.cpp +++ b/src/input/r_real.cpp @@ -381,8 +381,9 @@ real_reader_c::parse_headers() { dmx->fourcc[4] = 0; p += 4; if (size > (p - buffer)) { - dmx->extra_data = (unsigned char *)p; dmx->extra_data_size = size - (p - buffer); + dmx->extra_data = + (unsigned char *)safememdup(p, dmx->extra_data_size); } }