From 009eccf640a96762b6d8610c0f63497a9bf90c33 Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Thu, 4 Apr 2013 15:32:10 +0800 Subject: [PATCH] fix the wrong strcpy issue in list() function --- components/finsh/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/finsh/cmd.c b/components/finsh/cmd.c index 18f6df4a3..29c17da6d 100644 --- a/components/finsh/cmd.c +++ b/components/finsh/cmd.c @@ -620,7 +620,7 @@ long list(void) FINSH_NEXT_SYSCALL(index)) { /* skip the internal command */ - if (strncpy((char*)index->name, "__", 2) == 0) continue; + if (strncmp((char*)index->name, "__", 2) == 0) continue; #ifdef FINSH_USING_DESCRIPTION rt_kprintf("%-16s -- %s\n", index->name, index->desc); -- GitLab