You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For efficiency we still default boundary_id_type to 16-bit (signed, for some reason...), so users can easily manually specify a BoundaryName which is an integer (so we try to convert it to an id directly rather than treating it as a string name) but which fails to fit in boundary_id_type (so conversion via istream just gives us 2^15-1) ... and when this happens we don't test for failure afterward.
Design
Check the failbit on that istream, scream an informative error message and die if it's set.
Impact
It's possible for a user's input file to be fine with the current behavior, which would produce e.g. a boundary name of "40000" attached to a boundary id of 32767, which doesn't inherently break anything. But I suspect any users who have so narrowly avoided being bitten by this bug will be fine changing their files to accommodate its fix.
The text was updated successfully, but these errors were encountered:
Reason
For efficiency we still default
boundary_id_type
to 16-bit (signed, for some reason...), so users can easily manually specify aBoundaryName
which is an integer (so we try to convert it to an id directly rather than treating it as a string name) but which fails to fit inboundary_id_type
(so conversion viaistream
just gives us 2^15-1) ... and when this happens we don't test for failure afterward.Design
Check the
failbit
on thatistream
, scream an informative error message and die if it's set.Impact
It's possible for a user's input file to be fine with the current behavior, which would produce e.g. a boundary name of "40000" attached to a boundary id of 32767, which doesn't inherently break anything. But I suspect any users who have so narrowly avoided being bitten by this bug will be fine changing their files to accommodate its fix.
The text was updated successfully, but these errors were encountered: