libavformat/matroskaenc.c:336: error: Integer Overflow L2
  ([0, 9] - 1):unsigned64 by call to `put_ebml_void`.

libavformat/matroskaenc.c:335:76: Call
333. 
334.     if (seekhead->reserved_size > 0) {
335.         uint64_t remaining = seekhead->filepos + seekhead->reserved_size - avio_tell(pb);
                                                                                ^
336.         put_ebml_void(pb, remaining);
337.         avio_seek(pb, currentpos, SEEK_SET);

libavformat/avio.h:455:12: Call
  453. static av_always_inline int64_t avio_tell(AVIOContext *s)
  454. {
  455.     return avio_seek(s, 0, SEEK_CUR);
                  ^
  456. }
  457. 

libavformat/aviobuf.c:189:9: Assignment
    187. 
    188.     if(!s)
    189.         return AVERROR(EINVAL);
                 ^
    190. 
    191.     pos = s->pos - (s->write_flag ? 0 : (s->buf_end - s->buffer));

libavformat/avio.h:455:5: Assignment
  453. static av_always_inline int64_t avio_tell(AVIOContext *s)
  454. {
  455.     return avio_seek(s, 0, SEEK_CUR);
           ^
  456. }
  457. 

libavformat/matroskaenc.c:335:9: Assignment
333. 
334.     if (seekhead->reserved_size > 0) {
335.         uint64_t remaining = seekhead->filepos + seekhead->reserved_size - avio_tell(pb);
             ^
336.         put_ebml_void(pb, remaining);
337.         avio_seek(pb, currentpos, SEEK_SET);

libavformat/matroskaenc.c:336:9: Call
334.     if (seekhead->reserved_size > 0) {
335.         uint64_t remaining = seekhead->filepos + seekhead->reserved_size - avio_tell(pb);
336.         put_ebml_void(pb, remaining);
             ^
337.         avio_seek(pb, currentpos, SEEK_SET);
338. 

libavformat/matroskaenc.c:204:1: <LHS trace>
202.  * @param size The number of bytes to reserve, which must be at least 2.
203.  */
204. static void put_ebml_void(AVIOContext *pb, uint64_t size)
     ^
205. {
206.     int64_t currentpos = avio_tell(pb);

libavformat/matroskaenc.c:204:1: Parameter `size`
  202.  * @param size The number of bytes to reserve, which must be at least 2.
  203.  */
  204. static void put_ebml_void(AVIOContext *pb, uint64_t size)
       ^
  205. {
  206.     int64_t currentpos = avio_tell(pb);

libavformat/matroskaenc.c:215:9: Binary operation: ([0, 9] - 1):unsigned64 by call to `put_ebml_void` 
  213.     // size if possible, 1 byte otherwise
  214.     if (size < 10)
  215.         put_ebml_num(pb, size-1, 0);
               ^
  216.     else
  217.         put_ebml_num(pb, size-9, 8);
