From 662aa1b7e2922db39c36b25a169001bffc03e7b4 Mon Sep 17 00:00:00 2001 From: zhkag Date: Tue, 23 May 2023 10:03:23 +0800 Subject: [PATCH] =?UTF-8?q?[libc=20error]=20=E7=BC=96=E8=AF=91=E9=94=99?= =?UTF-8?q?=E8=AF=AFPATH=5FMAX=20=E6=9C=AA=E5=AE=9A=E4=B9=89=EF=BC=8C?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=20mq=20=E4=B8=AD=E7=9A=84=20PATH=5FMAX=20?= =?UTF-8?q?=E5=88=A4=E6=96=AD=20(#7550)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/posix/ipc/mqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/libc/posix/ipc/mqueue.c b/components/libc/posix/ipc/mqueue.c index b2e7b7b6c4..4b5905ef48 100644 --- a/components/libc/posix/ipc/mqueue.c +++ b/components/libc/posix/ipc/mqueue.c @@ -138,7 +138,7 @@ mqd_t mq_open(const char *name, int oflag, ...) /* lock posix mqueue list */ rt_sem_take(&posix_mq_lock, RT_WAITING_FOREVER); int len = rt_strlen(name); - if (len > PATH_MAX || len > RT_NAME_MAX) + if (len > RT_NAME_MAX) { rt_set_errno(ENAMETOOLONG); goto __return;