Mercurial > libavcodec.hg
comparison faxcompr.c @ 8473:412697cccf8e libavcodec
Ensure that an invalid run terminates the line.
author | michael |
---|---|
date | Fri, 26 Dec 2008 14:57:42 +0000 |
parents | 771f97593234 |
children | cb4009996efa |
comparison
equal
deleted
inserted
replaced
8472:771f97593234 | 8473:412697cccf8e |
---|---|
134 pix_left -= run; | 134 pix_left -= run; |
135 *runs++ = run; | 135 *runs++ = run; |
136 if(pix_left <= 0){ | 136 if(pix_left <= 0){ |
137 if(!pix_left) | 137 if(!pix_left) |
138 break; | 138 break; |
139 runs[-1] = 0; | 139 runs[-1] += pix_left; |
140 av_log(avctx, AV_LOG_ERROR, "Run went out of bounds\n"); | 140 av_log(avctx, AV_LOG_ERROR, "Run went out of bounds\n"); |
141 return -1; | 141 return -1; |
142 } | 142 } |
143 run = 0; | 143 run = 0; |
144 mode = !mode; | 144 mode = !mode; |