I mean, the query is “timer $period”. It’s correct in its syntax, a period’s a period. It’s not asking for “timer TIMMY; DROP TABLES”. That’s incorrect input.
Undefined behavior on obviously incorrect input is always a bug. Incorrect input should give you an error.
"Undefined behavior consists of exactly one proposition, to wit: There must be compiler engineers whom the language standard protects but does not bind, alongside developers whom the language standard binds but does not protect." (source: https://twitter.com/jckarter/status/1558181259314167808 )
You must be a C programmer.
Haha. I was thinking along similar lines as kuboble, but then I'm someone in the process of trying to learn C.
I agree, upon further thought, that at least an error message would be better for the user (e.g. "Maximum timer duration exceeded").
It's not incorrect input. It's incorrect handling of accepted input.