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

libavformat/matroskaenc.c:870:15: Call
868.         ret = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_CUES    , cuespos);
869.         if (ret < 0) return ret;
870.         ret = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_SEEKHEAD, second_seekhead);
                   ^
871.         if (ret < 0) return ret;
872.         mkv_write_seekhead(pb, mkv->main_seekhead);

libavformat/matroskaenc.c:267:1: Parameter `seekhead->entries->segmentpos`
  265. }
  266. 
  267. static int mkv_add_seekhead_entry(mkv_seekhead *seekhead, unsigned int elementid, uint64_t filepos)
       ^
  268. {
  269.     mkv_seekhead_entry *entries = seekhead->entries;

libavformat/matroskaenc.c:872:9: Call
870.         ret = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_SEEKHEAD, second_seekhead);
871.         if (ret < 0) return ret;
872.         mkv_write_seekhead(pb, mkv->main_seekhead);
             ^
873. 
874.         // update the duration

libavformat/matroskaenc.c:294:1: Parameter `seekhead->filepos`
  292.  * @return The file offset where the seekhead was written.
  293.  */
  294. static int64_t mkv_write_seekhead(ByteIOContext *pb, mkv_seekhead *seekhead)
       ^
  295. {
  296.     ebml_master metaseek, seekentry;

libavformat/matroskaenc.c:321:9: Assignment
  319. 
  320.     if (seekhead->reserved_size > 0) {
  321.         uint64_t remaining = seekhead->filepos + seekhead->reserved_size - url_ftell(pb);
               ^
  322.         put_ebml_void(pb, remaining);
  323.         url_fseek(pb, currentpos, SEEK_SET);

libavformat/matroskaenc.c:322:9: Call
  320.     if (seekhead->reserved_size > 0) {
  321.         uint64_t remaining = seekhead->filepos + seekhead->reserved_size - url_ftell(pb);
  322.         put_ebml_void(pb, remaining);
               ^
  323.         url_fseek(pb, currentpos, SEEK_SET);
  324. 

libavformat/matroskaenc.c:189:1: <LHS trace>
187.  * @param size The number of bytes to reserve, which must be at least 2.
188.  */
189. static void put_ebml_void(ByteIOContext *pb, uint64_t size)
     ^
190. {
191.     int64_t currentpos = url_ftell(pb);

libavformat/matroskaenc.c:189:1: Parameter `size`
    187.  * @param size The number of bytes to reserve, which must be at least 2.
    188.  */
    189. static void put_ebml_void(ByteIOContext *pb, uint64_t size)
         ^
    190. {
    191.     int64_t currentpos = url_ftell(pb);

libavformat/matroskaenc.c:200:9: Binary operation: ([0, 9] - 1):unsigned64 by call to `mkv_write_seekhead` 
    198.     // size if possible, 1 byte otherwise
    199.     if (size < 10)
    200.         put_ebml_num(pb, size-1, 0);
                 ^
    201.     else
    202.         put_ebml_num(pb, size-9, 8);
