This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Commit ec98bfd
committed
Fix handling of last number in IPv6 address
A previous fix for mishandling of certain IPv6 addresses ended up introducing another bug, where we may fail to fail parsing on an address that has too many numbers in its last sequence. The issue is that, if the string doesn't end with ']', we're not looping around again in the parsing loop, where the beginning of the loop would see the sequence thus far as being too long and error out (the previous fix included removing the adding of a ']' if it didn't exist). The fix is just to do the check again at the end.1 parent 7868e54 commit ec98bfd
File tree
1 file changed
+5
-3
lines changed- src/System.Net.Primitives/src/System/Net
1 file changed
+5
-3
lines changedLines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
245 | 250 | | |
246 | | - | |
247 | | - | |
248 | 251 | | |
249 | 252 | | |
250 | 253 | | |
251 | 254 | | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
255 | | - | |
256 | 258 | | |
257 | 259 | | |
258 | 260 | | |
| |||
0 commit comments