Ticket #4749: handlebit_size0.patch

File handlebit_size0.patch, 519 bytes (added by zazdxscf, 11 years ago)

bit_size == 0 was not handled

  • libavcodec/get_bits.h

    old new static inline int init_get_bits(GetBitCo  
    413413    int buffer_size;
    414414    int ret = 0;
    415415
    416     if (bit_size >= INT_MAX - 7 || bit_size < 0 || !buffer) {
     416    if (bit_size >= INT_MAX - 7 || bit_size <= 0 || !buffer) {
    417417        bit_size    = 0;
    418418        buffer      = NULL;
    419419        ret         = AVERROR_INVALIDDATA;