tree-wide: be more careful when passing literal integers to "t" bus message fields
Since we use varargs for sd_message_append() we need to make sure the parameters we pass are actually 64bit wide, if "t" is used. Hence cast appropriately if necessary. I went through the whole tree, and in most cases we got it right, but there are some cases we missed so far. Inspired by: #31420
This commit is contained in:
committed by
Yu Watanabe
parent
ff80bd2d6d
commit
04a3af3c6d
@@ -1130,7 +1130,7 @@ static int copy_files(int argc, char *argv[], void *userdata) {
|
||||
return bus_log_create_error(r);
|
||||
|
||||
if (arg_force) {
|
||||
r = sd_bus_message_append(m, "t", MACHINE_COPY_REPLACE);
|
||||
r = sd_bus_message_append(m, "t", (uint64_t) MACHINE_COPY_REPLACE);
|
||||
if (r < 0)
|
||||
return bus_log_create_error(r);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user