comparison aviobuf.c @ 780:46d81c56df9b libavformat

10l (segfault fix)
author michael
date Fri, 03 Jun 2005 08:48:10 +0000
parents 4fbe04f998bf
children 2614d3c1f415
comparison
equal deleted inserted replaced
779:5697cc32e295 780:46d81c56df9b
270 /* no need to do anything if EOF already reached */ 270 /* no need to do anything if EOF already reached */
271 if (s->eof_reached) 271 if (s->eof_reached)
272 return; 272 return;
273 273
274 if(s->update_checksum){ 274 if(s->update_checksum){
275 s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_end - s->checksum_ptr); 275 if(s->buf_end > s->checksum_ptr)
276 s->checksum= s->update_checksum(s->checksum, s->checksum_ptr, s->buf_end - s->checksum_ptr);
276 s->checksum_ptr= s->buffer; 277 s->checksum_ptr= s->buffer;
277 } 278 }
278 279
279 len = s->read_packet(s->opaque, s->buffer, s->buffer_size); 280 len = s->read_packet(s->opaque, s->buffer, s->buffer_size);
280 if (len <= 0) { 281 if (len <= 0) {