From c280bd244088988bcb62e782751e9338a6638a6b Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Sun, 9 Jan 2022 11:43:37 -0600 Subject: [PATCH] Change sprintf to snprint in hd1780.c https://github.com/Hamlib/Hamlib/issues/857 --- rotators/heathkit/hd1780.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rotators/heathkit/hd1780.c b/rotators/heathkit/hd1780.c index b5673ff8d..2ef77b274 100644 --- a/rotators/heathkit/hd1780.c +++ b/rotators/heathkit/hd1780.c @@ -67,7 +67,7 @@ const struct rot_caps hd1780_rot_caps = ROT_MODEL(ROT_MODEL_HD1780), .model_name = "HD 1780 Intellirotor", .mfg_name = "Heathkit", - .version = "20200112.0", + .version = "20220109.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rot_type = ROT_TYPE_OTHER, @@ -190,7 +190,7 @@ static int hd1780_rot_set_position(ROT *rot, azimuth_t azimuth, if (azimuth < 0) { azimuth = azimuth + 360; } - sprintf(cmdstr, "%03.0f", azimuth); /* Target bearing */ + snprintf(cmdstr, sizeof(cmdstr), "%03.0f", azimuth); /* Target bearing */ err = hd1780_send_priv_cmd(rot, cmdstr); if (err != RIG_OK)