<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.9600.19431"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=940382713-20022020>Good to know! I think I'll just stick
to snprintf,all the same. :-)</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=940382713-20022020></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=940382713-20022020>Mike</SPAN></FONT></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV lang=en-us class=OutlookMessageHeader dir=ltr align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> cfp-interest-bounces@oakapple.net
[mailto:cfp-interest-bounces@oakapple.net] <B>On Behalf Of </B>Rajan
Bhakta<BR><B>Sent:</B> 20 February 2020 02:05<BR><B>To:</B>
CFP<BR><B>Subject:</B> [Cfp-interest 1507] Fw: Re: Question about strfromd in
glibc<BR></FONT><BR></DIV>
<DIV></DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: sans-serif">So it seems
glibc does do the right thing (null terminate) and the web page was
wrong.</SPAN><BR><BR><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: sans-serif">Regards,<BR><BR>Rajan
Bhakta<BR>z/OS XL C/C++ Compiler Technical Architect<BR>ISO C Standards
Representative for Canada, PL22.11 Chair (USA)<BR>C Compiler
Development<BR>Contact: rbhakta@us.ibm.com, Rajan
Bhakta/Houston/IBM</SPAN><BR><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #800080">-----
Forwarded by Rajan Bhakta/Houston/IBM on 02/19/2020 08:04 PM
-----</SPAN><BR><BR><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #5f5f5f">From:
</SPAN><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif">Joseph Myers
<joseph@codesourcery.com></SPAN><BR><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #5f5f5f">To:
</SPAN><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif">Rajan Bhakta
<rbhakta@us.ibm.com></SPAN><BR><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #5f5f5f">Date:
</SPAN><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif">02/19/2020 04:20
PM</SPAN><BR><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #5f5f5f">Subject:
</SPAN><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif">[EXTERNAL] Re: Question about
strfromd in glibc</SPAN><BR>
<HR noShade>
<BR><BR><BR><TT><SPAN style="FONT-SIZE: 10pt">On Wed, 19 Feb 2020, Rajan
Bhakta wrote:<BR><BR>> Hi Joseph,<BR>> <BR>> Looking at
</SPAN></TT><A
href="http://man7.org/linux/man-pages/man3/strfromd.3.html"><TT><SPAN
style="FONT-SIZE: 10pt">http://man7.org/linux/man-pages/man3/strfromd.3.html</SPAN></TT></A><TT><SPAN
style="FONT-SIZE: 10pt">, it seems <BR>> to say you could end up with
strings that are not null terminated. But <BR>> from the C standard draft
(N2454 for example) it says that the strings are <BR>> always null
terminated and only that you may get incomplete (truncation <BR>> from the
right) if 'n' is too small (yet still null terminated). Was this <BR>> an
intentional decision or am I understanding the documentation wrong?<BR><BR>The
strfrom functions are equivalent to particular calls to snprintf, so <BR>they
should always null-terminate their output (when a nonzero size is
<BR>specified). The manpages are not official glibc
documentation.<BR><BR>-- <BR>Joseph S.
Myers<BR>joseph@codesourcery.com<BR><BR></SPAN></TT><BR><BR></BLOCKQUOTE></BODY></HTML>