RTEMS | cpukit/stringto: add null check for input string in stringto* methods (!929)

Joel Sherrill (@joel) gitlab at rtems.org
Thu Feb 5 19:58:57 UTC 2026




Joel Sherrill started a new discussion on cpukit/libmisc/stringto/stringto_template.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/929#note_141807

 >  #endif
 >    char *end;
 >  
 > -  if ( NULL == n )
 > +  if ( NULL == s || NULL == n )

Split this into 2 separate if's. They are easier to test that way and completely avoid the possibility of needing MCDC analysis.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/929#note_141807
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/20260205/943d97ac/attachment.htm>


More information about the bugs mailing list