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

libavformat/matroskaenc.c:926:15: Call
924.         second_seekhead = mkv_write_seekhead(pb, mkv->cluster_seekhead);
925. 
926.         ret = mkv_add_seekhead_entry(mkv->main_seekhead, MATROSKA_ID_CUES    , cuespos);
                   ^
927.         if (ret < 0) return ret;
928.         if (second_seekhead >= 0) {

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:932:9: Call
930.             if (ret < 0) return ret;
931.         }
932.         mkv_write_seekhead(pb, mkv->main_seekhead);
             ^
933. 
934.         // update the duration

libavformat/matroskaenc.c:295:1: Parameter `seekhead->filepos`
  293.  * -1 if an error occurred.
  294.  */
  295. static int64_t mkv_write_seekhead(ByteIOContext *pb, mkv_seekhead *seekhead)
       ^
  296. {
  297.     ebml_master metaseek, seekentry;

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

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

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

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

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