Public bug reported: Expected behavior:
int test = 5; wchat_t* buff = NULL; size_t strlen = swprintf(buff ,0 , L"%d", test); In this instance I would expect strlen = 1; ----------------------------------- Actual behavior: strlen = 18446744073709551615 ----------------------------------- Extra Info: apt-cache policy libc6 libc6: Installed: 2.23-0ubuntu5 Candidate: 2.23-0ubuntu5 Version table: *** 2.23-0ubuntu5 500 500 http://gb.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages 100 /var/lib/dpkg/status 2.23-0ubuntu3 500 500 http://gb.archive.ubuntu.com/ubuntu xenial/main amd64 Packages ----------------------------------- lsb_release -rd Description: Ubuntu 16.04.1 LTS Release: 16.04 ** Affects: glibc (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1658715 Title: swprintf return incorrect number of characters written when writing to NULL and 0 length To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1658715/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs