[Ffmpeg-devel] RealAudio 14.4
mkhodor7 at yahoo.com
mkhodor7
Sun Dec 11 15:40:35 CET 2005
The header contains a 16-bit length field, so in theory we could read up
to 64k of data. However the largest practical header (data we actually
parse) is 1044 bytes. So we can discard the rest.
--- libavformat/rm.c.old 11 Dec 2005 04:50:34 -0000
+++ libavformat/rm.c 11 Dec 2005 14:31:22 -0000
@@ -488,7 +488,7 @@
{
RMContext *rm = s->priv_data;
ByteIOContext *pb = &s->pb;
- char buf[65536];
+ char buf[1044];
uint32_t version;
int i;
@@ -499,8 +499,10 @@
unsigned char *ptr,*dst,*end;
int len;
ptr=buf;
- for(i = 0; i < (version & 0xffff); i++)
- *(ptr++)=get_byte(pb);
+ for(i = 0; i < (version & 0xffff); i++) {
+ if(ptr<buf+sizeof(buf)) *(ptr++)=get_byte(pb);
+ else get_byte(pb);
+ }
end=ptr;
ptr=buf+14;
// title
More information about the ffmpeg-devel
mailing list