Revision 104d0418 libavformat/os_support.c

View differences:

libavformat/os_support.c
46 46

  
47 47
    add1 = atoi(pch);
48 48
    pch = strpbrk(pch,".");
49
    if (pch == 0 || ++pch == 0) goto done;
49
    if (pch == 0 || ++pch == 0) return 0;
50 50
    add2 = atoi(pch);
51 51
    pch = strpbrk(pch,".");
52
    if (pch == 0 || ++pch == 0) goto done;
52
    if (pch == 0 || ++pch == 0) return 0;
53 53
    add3 = atoi(pch);
54 54
    pch = strpbrk(pch,".");
55
    if (pch == 0 || ++pch == 0) goto done;
55
    if (pch == 0 || ++pch == 0) return 0;
56 56
    add4 = atoi(pch);
57 57

  
58
done:
58
    if (!add1 || (add1|add2|add3|add4) > 255) return 0;
59

  
59 60
    add->s_addr=(add4<<24)+(add3<<16)+(add2<<8)+add1;
60 61

  
61 62
    return 1;

Also available in: Unified diff