libavcodec/cbs_h265_syntax_template.c:71: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `bitstream_skip`.

libavcodec/cbs_h265_syntax_template.c:61:1: Parameter `rw->bits_left`
59. }
60. 
61. static int FUNC(extension_data)(CodedBitstreamContext *ctx, RWContext *rw,
    ^
62.                                 H265RawPSExtensionData *current)
63. {

libavcodec/cbs_h265_syntax_template.c:70:17: Call
68.     uint8_t bit;
69.     start = *rw;
70.     for (k = 0; cbs_h2645_read_more_rbsp_data(rw); k++)
                    ^
71.         bitstream_skip(rw, 1);
72.     current->bit_length = k;

libavcodec/cbs_h2645.c:279:1: Parameter `bc->bits_left`
  277.     } while (0)
  278. 
  279. static int cbs_h2645_read_more_rbsp_data(BitstreamContext *bc)
       ^
  280. {
  281.     int bits_left = bitstream_bits_left(bc);

libavcodec/cbs_h265_syntax_template.c:71:9: Call
69.     start = *rw;
70.     for (k = 0; cbs_h2645_read_more_rbsp_data(rw); k++)
71.         bitstream_skip(rw, 1);
            ^
72.     current->bit_length = k;
73.     if (k > 0) {

libavcodec/bitstream.h:240:1: Parameter `n`
  238. 
  239. /* Skip n bits in the buffer. */
  240. static inline void bitstream_skip(BitstreamContext *bc, unsigned n)
       ^
  241. {
  242.     if (n < bc->bits_left)

libavcodec/bitstream.h:243:9: Call
  241. {
  242.     if (n < bc->bits_left)
  243.         skip_remaining(bc, n);
               ^
  244.     else {
  245.         n -= bc->bits_left;

libavcodec/bitstream.h:229:1: <LHS trace>
227. }
228. 
229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
     ^
230. {
231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:229:1: Parameter `bc->bits_left`
    227. }
    228. 
    229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
         ^
    230. {
    231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:229:1: <RHS trace>
227. }
228. 
229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
     ^
230. {
231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:229:1: Parameter `n`
    227. }
    228. 
    229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
         ^
    230. {
    231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:236:5: Binary operation: ([0, +oo] - 1):unsigned32 by call to `bitstream_skip` 
    234.     bc->bits <<= n;
    235. #endif
    236.     bc->bits_left -= n;
             ^
    237. }
    238. 

static inline void skip_remaining(BitstreamContext *bc, unsigned n)
{
#ifdef BITSTREAM_READER_LE
    bc->bits >>= n;
#else
    bc->bits <<= n;
#endif
    bc->bits_left -= n;
}
['static int FUNC(extension_data)(CodedBitstreamContext *ctx, RWContext *rw,\n                                H265RawPSExtensionData *current)\n{\n    int err;\n    size_t k;\n#ifdef READ\n    BitstreamContext start;\n    uint8_t bit;\n    start = *rw;\n    for (k = 0; cbs_h2645_read_more_rbsp_data(rw); k++)\n        bitstream_skip(rw, 1);\n    current->bit_length = k;\n    if (k > 0) {\n        *rw = start;\n        allocate(current->data, (current->bit_length + 7) / 8);\n        for (k = 0; k < current->bit_length; k++) {\n            xu(1, extension_data, bit, 0, 1);\n            current->data[k / 8] |= bit << (7 - k % 8);\n        }\n    }\n#else\n    for (k = 0; k < current->bit_length; k++)\n        xu(1, extension_data, current->data[k / 8] >> (7 - k % 8), 0, 1);\n#endif\n    return 0;\n}', 'static int cbs_h2645_read_more_rbsp_data(BitstreamContext *bc)\n{\n    int bits_left = bitstream_bits_left(bc);\n    if (bits_left > 8)\n        return 1;\n    if (bitstream_peek(bc, bits_left) == 1 << (bits_left - 1))\n        return 0;\n    return 1;\n}', 'static inline void bitstream_skip(BitstreamContext *bc, unsigned n)\n{\n    if (n < bc->bits_left)\n        skip_remaining(bc, n);\n    else {\n        n -= bc->bits_left;\n        bc->bits      = 0;\n        bc->bits_left = 0;\n        if (n >= 64) {\n            unsigned skip = n / 8;\n            n -= skip * 8;\n            bc->ptr += skip;\n        }\n        refill_64(bc);\n        if (n)\n            skip_remaining(bc, n);\n    }\n}', 'static inline void skip_remaining(BitstreamContext *bc, unsigned n)\n{\n#ifdef BITSTREAM_READER_LE\n    bc->bits >>= n;\n#else\n    bc->bits <<= n;\n#endif\n    bc->bits_left -= n;\n}']