libavformat/mxfenc.c:1719: 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:1676:1: Parameter `s->priv_data->body_partitions_count`
1674. }
1675. 
1676. static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt)
      ^
1677. {
1678.     MXFContext *mxf = s->priv_data;

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

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

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

libavformat/mxfenc.c:1232: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` 
  1230.         avio_wb64(pb, mxf->body_partition_offset[mxf->body_partitions_count-2]); // PreviousPartition
  1231.     else if (!memcmp(key, footer_partition_key, 16) && mxf->body_partitions_count)
  1232.         avio_wb64(pb, mxf->body_partition_offset[mxf->body_partitions_count-1]); // PreviousPartition
                              ^
  1233.     else
  1234.         avio_wb64(pb, 0);
