xiaoxiang781216 commented on code in PR #20771:
URL: https://github.com/apache/nuttx/pull/20771#discussion_r4307582561


##########
libs/libc/unistd/lib_access.c:
##########
@@ -92,16 +153,19 @@ int access(FAR const char *path, int amode)
       return 0;
     }
 
-  if (amode & W_OK)
+  if ((amode & W_OK) != 0 && (s.st_mode & S_IWUSR) == 0)
     {
-      if (s.st_mode & S_IWUSR)
-        {
-          return 0;
-        }
+      set_errno(EACCES);
+      return -1;
+    }
 
+#ifdef CONFIG_BINFMT_CHECKEXEC

Review Comment:
   why need check CONFIG_BINFMT_CHECKEXEC?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to