libavformat/rmdec.c:523: error: Uninitialized Value
  The value read from len2 was never initialized.

libavformat/rmdec.c:523:9: 
521.     if((seq & 0x7F) == 1 || vst->curpic_num != pic_num){
522.         vst->slices = ((hdr & 0x3F) << 1) + 1;
523.         vst->videobufsize = len2 + 8*vst->slices + 1;
             ^
524.         av_free_packet(&vst->pkt); //FIXME this should be output.
525.         if(av_new_packet(&vst->pkt, vst->videobufsize) < 0)

static int rm_assemble_video_frame(AVFormatContext *s, ByteIOContext *pb,
                                   RMDemuxContext *rm, RMStream *vst,
                                   AVPacket *pkt, int len)
{
    int hdr, seq, pic_num, len2, pos;
    int type;
    hdr = get_byte(pb); len--;
    type = hdr >> 6;
    if(type != 3){
        seq = get_byte(pb); len--;
    }
    if(type != 1){
        len2 = get_num(pb, &len);
        pos  = get_num(pb, &len);
        pic_num = get_byte(pb); len--;
    }
    if(len<0)
        return -1;
    rm->remaining_len = len;
    if(type&1){
        if(type == 3)
            len= len2;
        if(rm->remaining_len < len)
            return -1;
        rm->remaining_len -= len;
        if(av_new_packet(pkt, len + 9) < 0)
            return AVERROR(EIO);
        pkt->data[0] = 0;
        AV_WL32(pkt->data + 1, 1);
        AV_WL32(pkt->data + 5, 0);
        get_buffer(pb, pkt->data + 9, len);
        return 0;
    }
    if((seq & 0x7F) == 1 || vst->curpic_num != pic_num){
        vst->slices = ((hdr & 0x3F) << 1) + 1;
        vst->videobufsize = len2 + 8*vst->slices + 1;
        av_free_packet(&vst->pkt);
        if(av_new_packet(&vst->pkt, vst->videobufsize) < 0)
            return AVERROR(ENOMEM);
        vst->videobufpos = 8*vst->slices + 1;
        vst->cur_slice = 0;
        vst->curpic_num = pic_num;
        vst->pktpos = url_ftell(pb);
    }
    if(type == 2)
        len = FFMIN(len, pos);
    if(++vst->cur_slice > vst->slices)
        return 1;
    AV_WL32(vst->pkt.data - 7 + 8*vst->cur_slice, 1);
    AV_WL32(vst->pkt.data - 3 + 8*vst->cur_slice, vst->videobufpos - 8*vst->slices - 1);
    if(vst->videobufpos + len > vst->videobufsize)
        return 1;
    if (get_buffer(pb, vst->pkt.data + vst->videobufpos, len) != len)
        return AVERROR(EIO);
    vst->videobufpos += len;
    rm->remaining_len-= len;
    if(type == 2 || (vst->videobufpos) == vst->videobufsize){
        vst->pkt.data[0] = vst->cur_slice-1;
        *pkt= vst->pkt;
        vst->pkt.data= NULL;
        vst->pkt.size= 0;
        if(vst->slices != vst->cur_slice)
            memmove(pkt->data + 1 + 8*vst->cur_slice, pkt->data + 1 + 8*vst->slices,
                vst->videobufpos - 1 - 8*vst->slices);
        pkt->size = vst->videobufpos + 8*(vst->cur_slice - vst->slices);
        pkt->pts = AV_NOPTS_VALUE;
        pkt->pos = vst->pktpos;
        return 0;
    }
    return 1;
}
['static int rm_assemble_video_frame(AVFormatContext *s, ByteIOContext *pb,\n                                   RMDemuxContext *rm, RMStream *vst,\n                                   AVPacket *pkt, int len)\n{\n    int hdr, seq, pic_num, len2, pos;\n    int type;\n    hdr = get_byte(pb); len--;\n    type = hdr >> 6;\n    if(type != 3){\n        seq = get_byte(pb); len--;\n    }\n    if(type != 1){\n        len2 = get_num(pb, &len);\n        pos  = get_num(pb, &len);\n        pic_num = get_byte(pb); len--;\n    }\n    if(len<0)\n        return -1;\n    rm->remaining_len = len;\n    if(type&1){\n        if(type == 3)\n            len= len2;\n        if(rm->remaining_len < len)\n            return -1;\n        rm->remaining_len -= len;\n        if(av_new_packet(pkt, len + 9) < 0)\n            return AVERROR(EIO);\n        pkt->data[0] = 0;\n        AV_WL32(pkt->data + 1, 1);\n        AV_WL32(pkt->data + 5, 0);\n        get_buffer(pb, pkt->data + 9, len);\n        return 0;\n    }\n    if((seq & 0x7F) == 1 || vst->curpic_num != pic_num){\n        vst->slices = ((hdr & 0x3F) << 1) + 1;\n        vst->videobufsize = len2 + 8*vst->slices + 1;\n        av_free_packet(&vst->pkt);\n        if(av_new_packet(&vst->pkt, vst->videobufsize) < 0)\n            return AVERROR(ENOMEM);\n        vst->videobufpos = 8*vst->slices + 1;\n        vst->cur_slice = 0;\n        vst->curpic_num = pic_num;\n        vst->pktpos = url_ftell(pb);\n    }\n    if(type == 2)\n        len = FFMIN(len, pos);\n    if(++vst->cur_slice > vst->slices)\n        return 1;\n    AV_WL32(vst->pkt.data - 7 + 8*vst->cur_slice, 1);\n    AV_WL32(vst->pkt.data - 3 + 8*vst->cur_slice, vst->videobufpos - 8*vst->slices - 1);\n    if(vst->videobufpos + len > vst->videobufsize)\n        return 1;\n    if (get_buffer(pb, vst->pkt.data + vst->videobufpos, len) != len)\n        return AVERROR(EIO);\n    vst->videobufpos += len;\n    rm->remaining_len-= len;\n    if(type == 2 || (vst->videobufpos) == vst->videobufsize){\n        vst->pkt.data[0] = vst->cur_slice-1;\n        *pkt= vst->pkt;\n        vst->pkt.data= NULL;\n        vst->pkt.size= 0;\n        if(vst->slices != vst->cur_slice)\n            memmove(pkt->data + 1 + 8*vst->cur_slice, pkt->data + 1 + 8*vst->slices,\n                vst->videobufpos - 1 - 8*vst->slices);\n        pkt->size = vst->videobufpos + 8*(vst->cur_slice - vst->slices);\n        pkt->pts = AV_NOPTS_VALUE;\n        pkt->pos = vst->pktpos;\n        return 0;\n    }\n    return 1;\n}']