mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-05 10:10:35 +08:00
mavlink: Use snprintf over sprintf
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
committed by
Beat Küng
parent
ca1d32a29d
commit
837847f3ad
@@ -121,8 +121,8 @@ int MavlinkShell::start()
|
||||
|
||||
char r_in[32];
|
||||
char r_out[32];
|
||||
sprintf(r_in, "%d", remote_in_fd);
|
||||
sprintf(r_out, "%d", remote_out_fd);
|
||||
snprintf(r_in, sizeof(r_in), "%d", remote_in_fd);
|
||||
snprintf(r_out, sizeof(r_out), "%d", remote_out_fd);
|
||||
char *const argv[3] = {r_in, r_out, nullptr};
|
||||
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user