mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
Zero-terminate strings read from the RM file.
This commit is contained in:
parent
8a0d4bfc0f
commit
88ebf0e258
@ -677,11 +677,13 @@ rmff_read_headers(rmff_file_t *file) {
|
|||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
mdpr->name = (char *)safemalloc(size + 1);
|
mdpr->name = (char *)safemalloc(size + 1);
|
||||||
io->read(fh, mdpr->name, size);
|
io->read(fh, mdpr->name, size);
|
||||||
|
mdpr->name[size] = 0;
|
||||||
}
|
}
|
||||||
size = read_uint8(); /* mime_type_len */
|
size = read_uint8(); /* mime_type_len */
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
mdpr->mime_type = (char *)safemalloc(size + 1);
|
mdpr->mime_type = (char *)safemalloc(size + 1);
|
||||||
io->read(fh, mdpr->mime_type, size);
|
io->read(fh, mdpr->mime_type, size);
|
||||||
|
mdpr->mime_type[size] = 0;
|
||||||
}
|
}
|
||||||
size = read_uint32_be(); /* type_specific_size */
|
size = read_uint32_be(); /* type_specific_size */
|
||||||
rmff_put_uint32_be(&mdpr->type_specific_size, size);
|
rmff_put_uint32_be(&mdpr->type_specific_size, size);
|
||||||
|
Loading…
Reference in New Issue
Block a user