diff --git a/ChangeLog b/ChangeLog index 5947d671d..56c11adc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-08-30 Moritz Bunkus + + * 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 * mkvmerge: enhancement: SRT files that contain coordinates in the diff --git a/avilib-0.6.10/avilib.c b/avilib-0.6.10/avilib.c index 69f2b9e6e..28287f91a 100644 --- a/avilib-0.6.10/avilib.c +++ b/avilib-0.6.10/avilib.c @@ -574,7 +574,7 @@ static int avi_add_index_entry(avi_t *AVI, unsigned char *tag, long flags, unsig { 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); if(ptr == 0) {