10l (segfault fix)

Originally committed as revision 4341 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2005-06-03 08:48:10 +00:00
parent 84adb95ac2
commit 0f0680c553
1 changed files with 2 additions and 1 deletions

View File

@ -272,7 +272,8 @@ static void fill_buffer(ByteIOContext *s)
return;
if(s->update_checksum){
s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_end - s->checksum_ptr);
if(s->buf_end > s->checksum_ptr)
s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_end - s->checksum_ptr);
s->checksum_ptr= s->buffer;
}