You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/07/02 09:18:39 UTC
[incubator-nuttx-apps] branch master updated: netutils/telnetd: use
a larger buffer for a 64-bit pointer
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 55f9218 netutils/telnetd: use a larger buffer for a 64-bit pointer
55f9218 is described below
commit 55f921841d6ef8d544fda050f220c8612ec9d2c1
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Jul 2 15:13:00 2021 +0900
netutils/telnetd: use a larger buffer for a 64-bit pointer
---
netutils/telnetd/telnetd_daemon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/netutils/telnetd/telnetd_daemon.c b/netutils/telnetd/telnetd_daemon.c
index 99480ba..2756831 100644
--- a/netutils/telnetd/telnetd_daemon.c
+++ b/netutils/telnetd/telnetd_daemon.c
@@ -373,7 +373,7 @@ int telnetd_start(FAR struct telnetd_config_s *config)
{
FAR struct telnetd_s *daemon;
FAR char *argv[2];
- char arg0[16];
+ char arg0[sizeof("0x1234567812345678")];
pid_t pid;
/* Allocate a state structure for the new daemon */
@@ -394,7 +394,7 @@ int telnetd_start(FAR struct telnetd_config_s *config)
/* Then start the new daemon */
- snprintf(arg0, 16, "0x%" PRIxPTR, (uintptr_t)daemon);
+ snprintf(arg0, sizeof(arg0), "0x%" PRIxPTR, (uintptr_t)daemon);
argv[0] = arg0;
argv[1] = NULL;