From 9e1750d22c5a6e6695c64f325ec6dd5fd84f3ffc Mon Sep 17 00:00:00 2001 From: yuanyongjian Date: Tue, 20 Feb 2024 10:48:37 +0800 Subject: [PATCH] syslog/syslog_rpmsg.c: out of memory Signed-off-by: yuanyongjian --- drivers/syslog/syslog_rpmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/syslog/syslog_rpmsg.c b/drivers/syslog/syslog_rpmsg.c index 080f9ecb4d..63b58a27b9 100644 --- a/drivers/syslog/syslog_rpmsg.c +++ b/drivers/syslog/syslog_rpmsg.c @@ -233,7 +233,7 @@ static void syslog_rpmsg_addbuf(FAR struct syslog_rpmsg_s *priv, if (overwritten) { priv->tail = priv->head - priv->size; - priv->buffer[priv->tail] = 0; + priv->buffer[SYSLOG_RPMSG_TAILOFF(priv)] = 0; priv->tail++; }