[Ffmpeg-cvslog] r7788 - trunk/libavcodec/lzo.c
reimar
subversion
Wed Jan 31 22:20:32 CET 2007
Author: reimar
Date: Wed Jan 31 22:20:31 2007
New Revision: 7788
Modified:
trunk/libavcodec/lzo.c
Log:
Make sure we do not accidentially "fix" cnt to something < 0
Modified: trunk/libavcodec/lzo.c
==============================================================================
--- trunk/libavcodec/lzo.c (original)
+++ trunk/libavcodec/lzo.c Wed Jan 31 22:20:31 2007
@@ -87,11 +87,11 @@
register uint8_t *src = c->in;
register uint8_t *dst = c->out;
if (cnt > c->in_end - src) {
- cnt = c->in_end - src;
+ cnt = FFMAX(c->in_end - src, 0);
c->error |= LZO_INPUT_DEPLETED;
}
if (cnt > c->out_end - dst) {
- cnt = c->out_end - dst;
+ cnt = FFMAX(c->out_end - dst, 0);
c->error |= LZO_OUTPUT_FULL;
}
#if defined(INBUF_PADDED) && defined(OUTBUF_PADDED)
@@ -122,7 +122,7 @@
return;
}
if (cnt > c->out_end - dst) {
- cnt = c->out_end - dst;
+ cnt = FFMAX(c->out_end - dst, 0);
c->error |= LZO_OUTPUT_FULL;
}
if (back == 1) {
More information about the ffmpeg-cvslog
mailing list