NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/54350: lib/libcurses/t_curses/mvscanw test fails



The following reply was made to PR lib/54350; it has been noted by GNATS.

From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: blymn%netbsd.org@localhost
Subject: Re: lib/54350: lib/libcurses/t_curses/mvscanw test fails
Date: Sat, 8 Feb 2020 01:18:53 +0300

 Not sure about amd64, but the mvscanw test command is wrong as it
 always prints the string[] buffer with %s.
 
 Consider
 
   input "50 12\n"
   call2 OK "2" mvscanw 3 5 "%d"
 
 Now, on a big-endian host, say macppc.  mvscanw "%d" will read "50"
 and store "\x00\x00\x00\x32" at the beginning of string[].  When
 string[] is printed with %s, nothing is printed, b/c the first byte is
 NUL.
 
 -uwe
 


Home | Main Index | Thread Index | Old Index