A NOTE has been added to this issue. ====================================================================== https://austingroupbugs.net/view.php?id=1834 ====================================================================== Reported By: Don Cragun Assigned To: ====================================================================== Project: 1003.1(2024)/Issue8 Issue ID: 1834 Category: System Interfaces Type: Error Severity: Editorial Priority: normal Status: New Name: Don Cragun Organization: User Reference: Section: strlen() & wcslen() Page Number: 2147, 2380 Line Number: 70218-70220, 77131-77134 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2024-06-20 00:26 UTC Last Modified: 2024-10-24 15:43 UTC ====================================================================== Summary: strnlen() & wcsnlen() descriptions use of "terminating" NUL character ======================================================================
---------------------------------------------------------------------- (0006935) geoffclare (manager) - 2024-10-24 15:43 https://austingroupbugs.net/view.php?id=1834#c6935 ---------------------------------------------------------------------- On P2147, L70218-70220 (in strlen()) change: <blockquote><CX>The <i>strnlen</i>() function shall compute the smaller of the number of bytes in the array to which <i>s</i> points, not including any terminating NUL character, or the value of the <i>maxlen</i> argument. The <i>strnlen</i>() function shall never examine more than <i>maxlen</i> bytes of the array pointed to by <i>s</i>.</CX> </blockquote> to: <blockquote><CX>The <i>strnlen</i>() function shall count not more than <i>maxlen</i> bytes (a null byte and bytes that follow it are not counted) in the array to which <i>s</i> points. At most the first <i>maxlen</i> bytes of <i>s</i> shall be accessed by <i>strnlen</i>(). The implementation shall behave as if it reads the bytes sequentially and stops as soon as a null byte is found.</CX> </blockquote> On P2380 L77131-.77134 (in wcslen()) change: <blockquote><CX>The <i>wcsnlen</i>() function shall compute the smaller of the number of wide characters in the array to which <i>ws</i> points, not including any terminating null wide-character code, and the value of <i>maxlen</i>. The <i>wcsnlen</i>() function shall never examine more than the first <i>maxlen</i> characters of the wide-character array pointed to by <i>ws</i>.</CX></blockquote> to: <blockquote><CX>The <i>wcsnlen</i>() function shall count not more than <i>maxlen</i> wide character codes (a null wide-character code and wide-character codes that follow it are not counted) in the array to which <i>ws</i> points. At most the first <i>maxlen</i> wide-character codes of <i>ws</i> shall be accessed by <i>wcsnlen</i>(). The implementation shall behave as if it reads the wide-character codes sequentially and stops as soon as a null wide-character code is found.</CX> </blockquote> Issue History Date Modified Username Field Change ====================================================================== 2024-06-20 00:26 Don Cragun New Issue 2024-06-20 00:26 Don Cragun Name => Don Cragun 2024-06-20 00:26 Don Cragun Section => strlen() & wcslen() 2024-06-20 00:26 Don Cragun Page Number => 2147, 2380 2024-06-20 00:26 Don Cragun Line Number => 70218-70220, 77131-77134 2024-06-20 00:26 Don Cragun Interp Status => --- 2024-06-20 00:38 Don Cragun Description Updated 2024-06-20 00:38 Don Cragun Desired Action Updated 2024-06-20 11:15 geoffclare Note Added: 0006820 2024-06-20 14:30 Don Cragun Note Added: 0006821 2024-06-20 14:32 Don Cragun Note Edited: 0006821 2024-06-20 14:57 geoffclare Note Added: 0006822 2024-06-20 15:33 Don Cragun Note Added: 0006823 2024-06-20 18:22 eblake Note Added: 0006824 2024-06-21 15:24 nick File Added: n3252b.pdf 2024-06-21 15:28 nick Note Added: 0006830 2024-07-10 01:31 eblake Note Added: 0006831 2024-07-11 15:54 eblake Note Added: 0006832 2024-07-12 01:23 kre Note Added: 0006833 2024-07-12 17:57 eblake Note Added: 0006834 2024-07-13 01:10 kre Note Added: 0006835 2024-10-24 15:43 geoffclare Note Added: 0006935 ======================================================================