Revision ce60c2d1 libavcodec/msrledec.c

View differences:

libavcodec/msrledec.c
145 145
            p2 = *src++;
146 146
            if(p2 == 0) { //End-of-line
147 147
                output = pic->data[0] + (--line) * pic->linesize[0];
148
                if (line < 0)
148
                if (line < 0){
149
                    av_log(avctx, AV_LOG_ERROR, "Next line is beyond picture bounds\n");
149 150
                    return -1;
151
                }
150 152
                pos = 0;
151 153
                continue;
152 154
            } else if(p2 == 1) { //End-of-picture
......
155 157
                p1 = *src++;
156 158
                p2 = *src++;
157 159
                line -= p2;
158
                if (line < 0)
160
                if (line < 0){
161
                    av_log(avctx, AV_LOG_ERROR, "Skip beyond picture bounds\n");
159 162
                    return -1;
163
                }
160 164
                pos += p1;
161 165
                output = pic->data[0] + line * pic->linesize[0] + pos * (depth >> 3);
162 166
                continue;

Also available in: Unified diff