Index: aviheader.c =================================================================== RCS file: /cvsroot/mplayer/main/libmpdemux/aviheader.c,v retrieving revision 1.73 diff -u -r1.73 aviheader.c --- aviheader.c 29 Mar 2006 19:31:31 -0000 1.73 +++ aviheader.c 6 Apr 2006 18:51:11 -0000 @@ -230,11 +230,8 @@ mp_msg (MSGT_HEADER, MSGL_WARN, "Broken super index chunk size: %u\n",s->wLongsPerEntry); s->wLongsPerEntry = sizeof(avisuperindex_entry)/4; } - msize = sizeof (avisuperindex_entry) * s->nEntriesInUse; - s->aIndex = malloc(msize); - memset (s->aIndex, 0, msize); - s->stdidx = malloc (s->nEntriesInUse * sizeof (avistdindex_chunk)); - memset (s->stdidx, 0, s->nEntriesInUse * sizeof (avistdindex_chunk)); + s->aIndex = calloc(s->nEntriesInUse, sizeof (avisuperindex_entry)); + s->stdidx = calloc(s->nEntriesInUse, sizeof (avistdindex_chunk)); // now the real index of indices for (i=0; inEntriesInUse; i++) {