diff --git a/bootstrap/redactor.go b/bootstrap/redactor.go index 349072b015..ea6142a616 100644 --- a/bootstrap/redactor.go +++ b/bootstrap/redactor.go @@ -16,7 +16,7 @@ type Redactor struct { maxlen int // Table of Boyer-Moore skip distances, and values to redact matching this end byte - table [255]struct { + table [256]struct { skip int needles [][]byte } diff --git a/bootstrap/redactor_test.go b/bootstrap/redactor_test.go index 18dc9d7223..40416f7630 100644 --- a/bootstrap/redactor_test.go +++ b/bootstrap/redactor_test.go @@ -112,3 +112,11 @@ func TestRedactorSubsetSecrets(t *testing.T) { t.Errorf("Redaction failed: %s", buf.String()) } } + +func TestRedactorLatin1(t *testing.T) { + var buf bytes.Buffer + redactor := NewRedactor(&buf, "[REDACTED]", []string{"ΓΏ"}) + + redactor.Write([]byte("foo")) + redactor.Flush() +}