Skip to content

Commit 944dab0

Browse files
committed
KEP-4222: Relax description of decode allocations fuzz test.
The goal of this test was to be able to identify pathological inputs that cause the decoder to allocate excessive amounts of memory (for example, by trusting the length indicated by the initial bytes of a string and preallocating a slice of that length). That can be achieved without attempting to enforce a specific limit on the ratio between input length and bytes allocated, which is subject to many variables.
1 parent ed7065f commit 944dab0

File tree

1 file changed

+1
-2
lines changed
  • keps/sig-api-machinery/4222-cbor-serializer

1 file changed

+1
-2
lines changed

keps/sig-api-machinery/4222-cbor-serializer/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,7 @@ As well as fuzz tests covering:
700700

701701
- for all native types, native-to-JSON-to-unstructured and
702702
native-to-CBOR-to-unstructured is identical
703-
- the number of bytes allocated per decode is not more than directly
704-
proportional to the input size
703+
- the number of bytes allocated per decode does not exceed a reasonable upper limit
705704
- roundtrip JSON-to-CBOR-to-JSON and CBOR-to-JSON-to-CBOR
706705
- roundtrip through implementations in at least some of the non-Go client
707706
languages

0 commit comments

Comments
 (0)