lwIP | rtemslwip/network_compat: Add gethostname/gethostid (!28)
Chris Johns (@chris)
gitlab at rtems.org
Tue Sep 9 23:15:57 UTC 2025
Merge request https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/merge_requests/28 was reviewed by Chris Johns
--
Chris Johns commented on a discussion on rtemslwip/common/network_compat.c: https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/merge_requests/28#note_130661
> + memcpy(name, hostname, copy_size);
> + /* Enforce null termination of output */
> + name[copy_size] = '\0';
[Open Group gethostname](https://pubs.opengroup.org/onlinepubs/9799919799/functions/gethostname.html) says:
> The returned name is null- terminated unless insufficient space is provided.
Would adding a terminating `nul` character break this?
--
View it on GitLab: https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/merge_requests/28
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/20250909/8f6a5aa3/attachment.htm>
More information about the bugs
mailing list