[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 27eb0087cb9c2c6332f88
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-05-08 12:49:55
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 27eb0087cb9c2c6332f88ae228c9c8ea11535972 (commit) from 493860dae806c650325ae430147fa06be827266f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 27eb0087cb9c2c6332f88ae228c9c8ea11535972 Author: Mike Black W9MDB <mdb...@ya...> Date: Sat May 8 07:49:01 2021 -0500 Fix buffer overflow in radant.c https://github.com/Hamlib/Hamlib/commit/0165d81e479965c17f0cd1fcbf1662bc2e9d41f3#commitcomment-50545346 diff --git a/rotators/radant/radant.c b/rotators/radant/radant.c index c9b7d7eb..aa3084a3 100644 --- a/rotators/radant/radant.c +++ b/rotators/radant/radant.c @@ -102,12 +102,12 @@ transaction_quit: static int radant_rot_set_position(ROT *rot, azimuth_t az, elevation_t el) { - char cmdstr[13]; + char cmdstr[32]; int retval; rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __func__, az, el); - sprintf(cmdstr, "Q%.1f %1.f\r", az, el); + snprintf(cmdstr, sizeof(cmdstr), "Q%.1f %1.f\r", az, el); retval = radant_transaction(rot, cmdstr, NULL, 0); @@ -128,7 +128,7 @@ radant_rot_get_position(ROT *rot, azimuth_t *az, elevation_t *el) rig_debug(RIG_DEBUG_TRACE, "%s called\n", __func__); - sprintf(cmdstr, "Y\r"); + snprintf(cmdstr, sizeof(cmdstr), "Y\r"); retval = radant_transaction(rot, cmdstr, ackbuf, sizeof(ackbuf)); @@ -182,7 +182,7 @@ const struct rot_caps radant_rot_caps = ROT_MODEL(ROT_MODEL_RADANT), .model_name = "AZ-1/AZV-1", .mfg_name = "Radant", - .version = "20210409.0", + .version = "20210508.0", .copyright = "LGPL", .status = RIG_STATUS_BETA, .rot_type = ROT_TYPE_OTHER, ----------------------------------------------------------------------- Summary of changes: rotators/radant/radant.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |