Named Queries, Int1 Parameter Overflow

Hi, everyone!

There exists the potential for integer overflow when using Int1 parameters in Named Queries. For example, if -1 is passed to an Int1 parameter of a Named Query, the value will be overflowed to 255 before the query string is built in consideration of the parameters. No errors are thrown and a value of -1 will become 255 for the purposes of your query. Please keep this in mind when working with Named Queries, as you'll need to implement validations to account for this outside of the Named Query.

Looks like a signed vs unsigned thing.

1 Like