Revision dbc53ffc libavcodec/lcldec.c

View differences:

libavcodec/lcldec.c
87 87
            continue;
88 88
        }
89 89
        if ((mask & (1 << (--maskbit))) == 0) {
90
            if (destptr + 4 > destptr_end)
90
            if (destptr_end - destptr < 4)
91 91
                break;
92 92
            memcpy(destptr, srcptr, 4);
93 93
            srclen -= 4;
......
101 101
            ofs &= 0x7ff;
102 102
            srclen -= 2;
103 103
            cnt *= 4;
104
            if (destptr + cnt > destptr_end) {
104
            if (destptr_end - destptr < cnt) {
105 105
                cnt =  destptr_end - destptr;
106 106
            }
107 107
            for (; cnt > 0; cnt--) {

Also available in: Unified diff