RTEMS | posix/mmap: Fix validation order for map_fixed addresses (!542)
shuhua hua (@huangshuhua)
gitlab at rtems.org
Fri Jul 11 06:20:49 UTC 2025
shuhua hua commented on a discussion: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/542#note_126334
Thanks for the technical clarification—I completely agree both orderings are standards-compliant given the checks don't dereference the pointer. For this implementation, I've intentionally maintained the NULL check first at line 144 as it streamlines readability by handling fundamental validity upfront before progressing to semantic alignment checks at line 148. This flow naturally aligns with defensive coding practices 。
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/542#note_126334
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250711/17f12ee8/attachment.htm>
More information about the bugs
mailing list