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.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to