Revision 4a194c8f

View differences:

libavformat/matroskadec.c
583 583
{
584 584
    int n = 0;
585 585

  
586
    if (size < 1 || size > 8)
586
    if (size > 8)
587 587
        return AVERROR_INVALIDDATA;
588 588

  
589 589
    /* big-endian ordering; build up number */
......
600 600
 */
601 601
static int ebml_read_float(ByteIOContext *pb, int size, double *num)
602 602
{
603
    if (size == 4) {
603
    if (size == 0) {
604
        *num = 0;
605
    } else if (size == 4) {
604 606
        *num= av_int2flt(get_be32(pb));
605 607
    } else if(size==8){
606 608
        *num= av_int2dbl(get_be64(pb));

Also available in: Unified diff