Ticket #961: mpeg12.diff

File mpeg12.diff, 683 bytes (added by jwestfall@…, 20 years ago)

patch that fixes

  • libs/libavcodec/mpeg12.c

     
    21882188    const uint8_t *buf_ptr= *pbuf_ptr;
    21892189
    21902190    buf_ptr++; //gurantees that -1 is within the array
    2191     buf_end -= 2; // gurantees that +2 is within the array
     2191    buf_end -= 3; // gurantees that +3 is within the array
    21922192
    21932193    while (buf_ptr < buf_end) {
    21942194        if(*buf_ptr==0){
     
    22022202        }
    22032203        buf_ptr += 2;
    22042204    }
    2205     buf_end += 2; //undo the hack above
     2205    buf_end += 3; //undo the hack above
    22062206   
    22072207    *pbuf_ptr = buf_end;
    22082208    return -1;