NetBSD-Bugs archive

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

Re: PR/49683



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

From: Amir P <amirpli%gmail.com@localhost>
To: gnats-bugs%gnats.netbsd.org@localhost
Cc: 
Subject: Re: PR/49683
Date: Sun, 22 Feb 2015 03:56:53 +0200

 --047d7bb04bbefe676b050fa39b1c
 Content-Type: text/plain; charset=UTF-8
 
 A question:
 
 The actual change that has been implemented in chartype.c rev. 1.11 is:
 
 if (conv->csize < ++len)
 if (ct_conv_buff_resize(conv, (size_t)0, len + CT_BUFSIZ) == -1)
 return NULL;
 
 Please clarify - we need to enlarge conv->wbuff in case its size
 conv->wsize is less than len+1.
 So why does the check above compare len+1 to conv->csize, which is not
 related to the size of conv->wbuff?
 
 --047d7bb04bbefe676b050fa39b1c
 Content-Type: text/html; charset=UTF-8
 Content-Transfer-Encoding: quoted-printable
 
 <div dir=3D"rtl"><div class=3D"gmail_default" style=3D"color:rgb(51,0,0)" d=
 ir=3D"ltr">A question:</div><div class=3D"gmail_default" style=3D"color:rgb=
 (51,0,0)" dir=3D"ltr"><br></div><div class=3D"gmail_default" style=3D"color=
 :rgb(51,0,0)" dir=3D"ltr">The actual change that has been implemented in ch=
 artype.c rev. 1.11 is:</div><div class=3D"gmail_default" style=3D"color:rgb=
 (51,0,0)" dir=3D"ltr"><br></div><div class=3D"gmail_default" style=3D"color=
 :rgb(51,0,0)" dir=3D"ltr"><div class=3D"gmail_default" dir=3D"ltr"><span cl=
 ass=3D"" style=3D"white-space:pre">	</span>if (conv-&gt;csize &lt; ++len)</=
 div><div class=3D"gmail_default" dir=3D"ltr"><span class=3D"" style=3D"whit=
 e-space:pre">		</span>if (ct_conv_buff_resize(conv, (size_t)0, len + CT_BUF=
 SIZ) =3D=3D -1)</div><div class=3D"gmail_default" dir=3D"ltr"><span class=
 =3D"" style=3D"white-space:pre">			</span>return NULL;</div><div><br></div>=
 <div>Please clarify - we need to enlarge conv-&gt;wbuff in case its size co=
 nv-&gt;wsize is less than len+1.</div><div>So why does the check above comp=
 are len+1 to=C2=A0conv-&gt;csize, which is not related to the size of=C2=A0=
 conv-&gt;wbuff?</div><div><br></div></div></div>
 
 --047d7bb04bbefe676b050fa39b1c--
 



Home | Main Index | Thread Index | Old Index