mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-04 09:15:05 +00:00
Avoid a segfault if max_idx has been set before. Fix for bug 256.
This commit is contained in:
parent
e00a819078
commit
4a8dcc0468
@ -1,3 +1,9 @@
|
|||||||
|
2007-08-30 Moritz Bunkus <moritz@bunkus.org>
|
||||||
|
|
||||||
|
* avilib: bug fix: Fixed a segmentation fault if reading the first
|
||||||
|
part of an index failed but a second/other index part is
|
||||||
|
present. Fix for bug 256.
|
||||||
|
|
||||||
2007-08-19 Moritz Bunkus <moritz@bunkus.org>
|
2007-08-19 Moritz Bunkus <moritz@bunkus.org>
|
||||||
|
|
||||||
* mkvmerge: enhancement: SRT files that contain coordinates in the
|
* mkvmerge: enhancement: SRT files that contain coordinates in the
|
||||||
|
@ -574,7 +574,7 @@ static int avi_add_index_entry(avi_t *AVI, unsigned char *tag, long flags, unsig
|
|||||||
{
|
{
|
||||||
void *ptr;
|
void *ptr;
|
||||||
|
|
||||||
if(AVI->n_idx>=AVI->max_idx) {
|
if(!AVI->idx || (AVI->n_idx>=AVI->max_idx)) {
|
||||||
ptr = realloc((void *)AVI->idx,(AVI->max_idx+4096)*16);
|
ptr = realloc((void *)AVI->idx,(AVI->max_idx+4096)*16);
|
||||||
|
|
||||||
if(ptr == 0) {
|
if(ptr == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user