Allocate space for the extra_data because it's freed later.

This commit is contained in:
Moritz Bunkus 2004-02-21 18:55:42 +00:00
parent e976802eb1
commit de6e647012
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,7 @@
2004-02-21 Moritz Bunkus <moritz@bunkus.org>
* 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,

View File

@ -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);
}
}