From 051f966039028d257f27fc3a42c10cbff9f7c738 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 23 Feb 2023 21:30:12 -0700 Subject: decode: Include the invalid UTF-8 byte in error messages --- ReleaseNotes.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ReleaseNotes.md') diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 48982e4..af2adcc 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -14,6 +14,10 @@ then the first type error encountered is returned. This is consistent with the behavior of `encoding/json`. + - Bugfix: Decoder: If there is a syntax error in a byte that + invalid UTF-8, include that byte value in the error message + rather than including the U+FFFD Unicode replacement character. + # v0.3.7 (2023-02-20) Theme: Fixes from fuzzing (part 1?) -- cgit v1.2.3-2-g168b From e38edfa53173c054ff97a5c51f90df0da60f16f5 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 14 Feb 2023 18:55:57 -0700 Subject: jsonparse: Reword error messages to match encoding/json --- ReleaseNotes.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ReleaseNotes.md') diff --git a/ReleaseNotes.md b/ReleaseNotes.md index af2adcc..1981678 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -14,6 +14,9 @@ then the first type error encountered is returned. This is consistent with the behavior of `encoding/json`. + - Change: Several error strings have been reworded to match + `encoding/json`. + - Bugfix: Decoder: If there is a syntax error in a byte that invalid UTF-8, include that byte value in the error message rather than including the U+FFFD Unicode replacement character. -- cgit v1.2.3-2-g168b From f68498a6fdb421483d9aebb45527452f6255bb68 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 25 Feb 2023 16:17:01 -0700 Subject: jsonparse: Don't show raw bytes as Unicode --- ReleaseNotes.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ReleaseNotes.md') diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 1981678..e047f7d 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -21,6 +21,10 @@ invalid UTF-8, include that byte value in the error message rather than including the U+FFFD Unicode replacement character. + - Bugfix: Syntax errors on raw-bytes (for invalid UTF-8) no longer + show the raw byte as a `\u00XX` Unicode codepoint, but now as a + `\xXX` byte. + # v0.3.7 (2023-02-20) Theme: Fixes from fuzzing (part 1?) -- cgit v1.2.3-2-g168b From 2a41777072f48467bef02bb3bd670d95c2b02102 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 14 Feb 2023 18:55:57 -0700 Subject: compat/json: Handle io.EOF and io.ErrUnexpectedEOF the same --- ReleaseNotes.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ReleaseNotes.md') diff --git a/ReleaseNotes.md b/ReleaseNotes.md index e047f7d..b7a8f76 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -25,6 +25,9 @@ show the raw byte as a `\u00XX` Unicode codepoint, but now as a `\xXX` byte. + - Bugfix: compat/json: `io.EOF` is now correctly converted to + "unexpected end of JSON input", same as `io.ErrUnexpectedEOF`. + # v0.3.7 (2023-02-20) Theme: Fixes from fuzzing (part 1?) -- cgit v1.2.3-2-g168b From 7bd0072b5896bfc4172b6bda778cf149dd6282fa Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 25 Feb 2023 16:17:06 -0700 Subject: reencode: Fix the byte count for partial writes --- ReleaseNotes.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ReleaseNotes.md') diff --git a/ReleaseNotes.md b/ReleaseNotes.md index b7a8f76..c9d1233 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -28,6 +28,11 @@ - Bugfix: compat/json: `io.EOF` is now correctly converted to "unexpected end of JSON input", same as `io.ErrUnexpectedEOF`. + - Bugfix: ReEncoder: Don't count bytes already in the UTF-8 decode + buffer toward the number of bytes returned from `.Write` and + `.WriteString`. This only comes up if there is an I/O causing a + partial write. + # v0.3.7 (2023-02-20) Theme: Fixes from fuzzing (part 1?) -- cgit v1.2.3-2-g168b From 22edcf6a68a057ed04368d5f78c8ba3ddfee8d57 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 25 Feb 2023 11:11:36 -0700 Subject: reencode: Improve the error messages for trailing partial-UTF-8 --- ReleaseNotes.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ReleaseNotes.md') diff --git a/ReleaseNotes.md b/ReleaseNotes.md index c9d1233..71973aa 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -33,6 +33,10 @@ `.WriteString`. This only comes up if there is an I/O causing a partial write. + - Bugfix: ReEncoder: The error messages for trailing partial UTF-8 + now reflect the `InvalidUTF8` setting, rather than simply saying + "unflushed unicode garbage". + # v0.3.7 (2023-02-20) Theme: Fixes from fuzzing (part 1?) -- cgit v1.2.3-2-g168b