OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 2857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2868 return false; | 2868 return false; |
2869 } | 2869 } |
2870 if(nDubbleColons > 1) | 2870 if(nDubbleColons > 1) |
2871 { | 2871 { |
2872 return false; | 2872 return false; |
2873 } | 2873 } |
2874 if(nColons > 7 || nColons < 2) | 2874 if(nColons > 7 || nColons < 2) |
2875 { | 2875 { |
2876 return false; | 2876 return false; |
2877 } | 2877 } |
| 2878 if(nColons < 7 && nDubbleColons == 0) |
| 2879 { |
| 2880 return false; |
| 2881 } |
2878 if(!(nDots == 3 || nDots == 0)) | 2882 if(!(nDots == 3 || nDots == 0)) |
2879 { | 2883 { |
2880 return false; | 2884 return false; |
2881 } | 2885 } |
2882 lastColonPos = -1; | 2886 lastColonPos = -1; |
2883 int32_t charsBeforeColon = 0; | 2887 int32_t charsBeforeColon = 0; |
2884 for(i = 0; i < nColons; i++) | 2888 for(i = 0; i < nColons; i++) |
2885 { | 2889 { |
2886 charsBeforeColon=colonPos[i]-lastColonPos-1; | 2890 charsBeforeColon=colonPos[i]-lastColonPos-1; |
2887 if(charsBeforeColon > 4) | 2891 if(charsBeforeColon > 4) |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2996 if (nDots != 3 || !allUnder256) | 3000 if (nDots != 3 || !allUnder256) |
2997 { | 3001 { |
2998 return false; | 3002 return false; |
2999 } | 3003 } |
3000 } | 3004 } |
3001 return true; | 3005 return true; |
3002 } | 3006 } |
3003 | 3007 |
3004 } // namespace test | 3008 } // namespace test |
3005 } // namespace webrtc | 3009 } // namespace webrtc |
OLD | NEW |