[Mplayer-cvslog] CVS: main demux_mpg.c,1.1.1.1,1.2

GEREOFFY arpi_esp at users.sourceforge.net
Thu Mar 29 02:18:37 CEST 2001


Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv29311

Modified Files:
	demux_mpg.c 
Log Message:
fix: packet longer than 4096 bytes

Index: demux_mpg.c
===================================================================
RCS file: /cvsroot/mplayer/main/demux_mpg.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** demux_mpg.c	2001/02/24 20:28:35	1.1.1.1
--- demux_mpg.c	2001/03/29 00:18:35	1.2
***************
*** 32,36 ****
    len=stream_read_word(demux->stream);
    if(verbose>=3)  printf("PACKET len=%d",len);
!   if(len==0 || len>4096) return -2;  // invalid packet !!!!!!
  
    while(len>0){   // Skip stuFFing bytes
--- 32,36 ----
    len=stream_read_word(demux->stream);
    if(verbose>=3)  printf("PACKET len=%d",len);
!   if(len==0 || len>224*1024) return -2;  // invalid packet !!!!!!
  
    while(len>0){   // Skip stuFFing bytes
***************
*** 66,70 ****
      len-=2;
      if(verbose>=3) printf("  hdrlen=%d  (len=%d)",hdrlen,len);
!     if(hdrlen>len) return -1; // invalid header length
      if(pts_flags==2){
        c=stream_read_char(demux->stream);
--- 66,70 ----
      len-=2;
      if(verbose>=3) printf("  hdrlen=%d  (len=%d)",hdrlen,len);
!     if(hdrlen>len){ printf("demux_mpg: invalid header length  \n"); return -1;}
      if(pts_flags==2){
        c=stream_read_char(demux->stream);
***************
*** 124,130 ****
      //if(c!=0x0f) printf("  {ERROR5,c=%d}  \n",c);
    }
!   if(verbose>=3) printf("\n");
  
!   if(len<=0 || len>4096) return -1;  // Invalid packet size
    
    if(id>=0x1C0 && id<=0x1DF){
--- 124,130 ----
      //if(c!=0x0f) printf("  {ERROR5,c=%d}  \n",c);
    }
!   if(verbose>=3) printf(" => len=%d\n",len);
  
!   if(len<=0 || len>224*1024) return -1;  // Invalid packet size
    
    if(id>=0x1C0 && id<=0x1DF){


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list