Commit efb744f
internal/export/idna: fix infinite loop in Go pre-1.10
lookupString returns 0 for incomplete UTF-8 sequences, so to
prevent infinite loops we must specifically check for that case.
However, CL 73730 which fixed this issue in 2017 was lost in the
shuffle that allowed multiple Unicode versions in x/text (CL 83235),
and the fix was never applied to idna9.0.0.go.
This CL fixes that oversight.
Updates golang/go#22184
Change-Id: I3a6ab08b157f4017560020ff259d1afbe49a9e71
Reviewed-on: https://go-review.googlesource.com/c/text/+/361494
Reviewed-by: Damien Neil <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
Reviewed-by: David Chase <[email protected]>
Reviewed-by: Marcel van Lohuizen <[email protected]>1 parent 48e4a4a commit efb744f
2 files changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
429 | 432 | | |
430 | 433 | | |
431 | 434 | | |
| |||
448 | 451 | | |
449 | 452 | | |
450 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
451 | 463 | | |
452 | 464 | | |
453 | 465 | | |
| |||
580 | 592 | | |
581 | 593 | | |
582 | 594 | | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
583 | 598 | | |
584 | 599 | | |
585 | 600 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
0 commit comments