changeset 780:46d81c56df9b libavformat

10l (segfault fix)
author michael
date Fri, 03 Jun 2005 08:48:10 +0000
parents 5697cc32e295
children ba478112ecb1
files aviobuf.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/aviobuf.c	Mon May 30 17:32:02 2005 +0000
+++ b/aviobuf.c	Fri Jun 03 08:48:10 2005 +0000
@@ -272,7 +272,8 @@
         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;
     }