From 4b6fb8f869ef1ad024f572b8c712bd8499b47552 Mon Sep 17 00:00:00 2001 From: Agis Zisimatos Date: Tue, 16 Jul 2019 23:32:29 +0300 Subject: [PATCH] easycomm: Return the correct value of pointer val Add value of ackbuf into value of val instead of the address, because isn't the same after the call of function easycomm_rot_get_conf(). Signed-off-by: Agis Zisimatos --- easycomm/easycomm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easycomm/easycomm.c b/easycomm/easycomm.c index 6c1322a37..c32b30ad5 100644 --- a/easycomm/easycomm.c +++ b/easycomm/easycomm.c @@ -314,8 +314,8 @@ static int easycomm_rot_get_conf(ROT *rot, token_t token, char *val) { rig_debug(RIG_DEBUG_TRACE, "%s got response: %s\n", __FUNCTION__, ackbuf); - /* Return given string at correct position*/ - val = &ackbuf[2]; /* CCxxxxxx */ + /* Return given string at correct position*/ + memcpy(val, ackbuf + 2, sizeof(ackbuf) - 2); /* CCxxxxxx */ return RIG_OK; }