Open julianbrost opened 2 years ago
Config snippet:
object CheckCommand "set-if-overflow" { command = ["echo"] arguments = { "42" = { set_if = 42 } "4294967296" = { set_if = 4294967296 } } } object Host "set-if-overflow" { check_command = "set-if-overflow" }
Executed the following command:
"last_check_result": { "active": true, "check_source": "master-2", "command": [ "echo", "42" ],
Using both numbers shouldn't make a difference, however it's casted to int here, which overflows with the value above: https://github.com/Icinga/icinga2/blob/32c7f7730db154ba0dff5856a8985d125791c73e/lib/icinga/macroprocessor.cpp#L480-L488
int
Hello @Al2Klimov @julianbrost . If this issue is still available, can you please assign it to me? It will be my first stint at open source contribution.
I doubt it's an issue, but...
Config snippet:
Executed the following command:
Using both numbers shouldn't make a difference, however it's casted to
int
here, which overflows with the value above: https://github.com/Icinga/icinga2/blob/32c7f7730db154ba0dff5856a8985d125791c73e/lib/icinga/macroprocessor.cpp#L480-L488