Skip to content

Commit 079c378

Browse files
committed
Fix infinite loop found by fuzzing
1 parent db354e4 commit 079c378

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

prettifier.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ func inWord(p *prettifier) stateFunc {
237237
continue
238238
}
239239
p.emit()
240+
return betweenWords
240241
default:
241242
if p.pos-p.start <= 1 {
242243
// word too short
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
go test fuzz v1
2+
string("0a0sV")

0 commit comments

Comments
 (0)