mxfenc: Fix possible integer overflows