libavformat/mxfenc.c:1716: error: Integer Overflow L2
  ([min(0, `s->priv_data->body_partitions_count`), 2+max(-1, `s->priv_data->body_partitions_count`)] - 1):unsigned32 by call to `mxf_write_partition`.

libavformat/mxfenc.c:1673:1: Parameter `s->priv_data->body_partitions_count`
1671. }
1672. 
1673. static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt)
      ^
1674. {
1675.     MXFContext *mxf = s->priv_data;

libavformat/mxfenc.c:1716:24: Call
1714.             !(ie.flags & 0x33)) { // I frame, Gop start
1715.             mxf_write_klv_fill(s);
1716.             if ((err = mxf_write_partition(s, 1, 2, body_partition_key, 0)) < 0)
                             ^
1717.                 return err;
1718.             mxf_write_klv_fill(s);

libavformat/mxfenc.c:1185:1: <LHS trace>
1183. }
1184. 
1185. static int mxf_write_partition(AVFormatContext *s, int bodysid,
      ^
1186.                                 int indexsid,
1187.                                 const uint8_t *key, int write_metadata)

libavformat/mxfenc.c:1185:1: Parameter `s->priv_data->body_partitions_count`
  1183. }
  1184. 
  1185. static int mxf_write_partition(AVFormatContext *s, int bodysid,
        ^
  1186.                                 int indexsid,
  1187.                                 const uint8_t *key, int write_metadata)

libavformat/mxfenc.c:1231:23: Binary operation: ([min(0, s->priv_data->body_partitions_count), 2+max(-1, s->priv_data->body_partitions_count)] - 1):unsigned32 by call to `mxf_write_partition` 
  1229.         avio_wb64(pb, mxf->body_partition_offset[mxf->body_partitions_count-2]); // PreviousPartition
  1230.     else if (!memcmp(key, footer_partition_key, 16) && mxf->body_partitions_count)
  1231.         avio_wb64(pb, mxf->body_partition_offset[mxf->body_partitions_count-1]); // PreviousPartition
                              ^
  1232.     else
  1233.         avio_wb64(pb, 0);
