types: use of reflect.ArrayOf may cause unbounded memory utilization
achille-roussel opened this issue · comments
The way slices and strings are represented using reflect.ArrayOf
causes risks of unbounded memory utilization because Go caches all types created by the reflect package. Using the variable length that may come from program inputs as parameter to reflect.ArrayOf
means that we would potentially create a new type for each value we deserialize.