Extreme field value for 32-bit floating point field is returned with a too-large value #1203
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
We can exercise the maximum 32-bit floating point value like this:
The response includes (other fields trimmed):
This can't be parsed by the .NET protobuf parser, because 3.4028235e+38 is outside the range of a 32-bit floating point number.
(We parse the value as a 64-bit floating point number, then check whether the value is greater than the maximum 32-bit floating point number - which in this case it is.)
The proto3 JSON specification isn't entirely clear on how limits should be applied.
Is this a standard protobuf JSON formatter that's emitting this value?
The text was updated successfully, but these errors were encountered: