changeset 2500:99b1de0018bb libavcodec

10l (use of deallocated memory)
author michael
date Fri, 04 Feb 2005 11:53:35 +0000
parents e003222c878d
children 236562127b89
files flac.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flac.c	Fri Feb 04 03:29:50 2005 +0000
+++ b/flac.c	Fri Feb 04 11:53:35 2005 +0000
@@ -634,10 +634,16 @@
             if(metadata_size){
                 switch(metadata_type)
                 {
-                case METADATA_TYPE_STREAMINFO:
+                case METADATA_TYPE_STREAMINFO:{
+                    int bits_count= get_bits_count(&s->gb);
+
                     metadata_streaminfo(s);
+                    buf= &s->bitstream[s->bitstream_index];
+                    init_get_bits(&s->gb, buf, buf_size*8);
+                    skip_bits(&s->gb, bits_count);
+
                     dump_headers(s);
-                    break;
+                    break;}
                 default:
                     for(i=0; i<metadata_size; i++)
                         skip_bits(&s->gb, 8);