Why no overflow in dspam.c:503

"Thomas Preud'homme" <[email protected]> Wed, 23 Jan 2013 15:28:56 +0100
Newsgroups gmane.mail.spam.dspam.devel
Message-ID <[email protected]>
--===============6950978787587832643==
Content-Type: multipart/signed; boundary="nextPart1710320.nqVvWTWXMQ";
	protocol="application/pgp-signature"; micalg=pgp-sha1
Content-Transfer-Encoding: 7bit

--nextPart1710320.nqVvWTWXMQ
Content-Type: Text/Plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Greetings everybody,

I was suggested to incorporate commit [1] in the Debian dspam package.=20
However, I was rightfully asked wether this is overflow-safe since strcpy i=
s=20
used. I suppose one of the _getline function is used to ensure CTX->usernam=
e=20
always ends with a '\0' and contains at max 1024 bytes but what about size =
of=20
ATX->recipient >=3D strlen(CTX->username) + 1 ?

[1]=20
http://dspam.git.sourceforge.net/git/gitweb.cgi?p=3Ddspam/dspam;a=3Dcommit;=
h=3Dcbed19764df8ecc1469f739ca33eb92aa3f67584

Best regards,

Thomas Preud'homme

--nextPart1710320.nqVvWTWXMQ
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAABAgAGBQJQ//OoAAoJENADhS+9UlKedf4P/AkGXgli8gSq9sgu4y14v7do
cBLkYanzLPJNGDuTPVikjZm8bLQHkPcSE9I2cYN/73Vhol72Onc3j/Ey39WZXymt
XD9So4nqeDGghCO4f/QSSZ6OsdqZcEUaMgZc7shvGzZceLvpqq6kukcBKQoLq5eJ
N8MoknsUMu3v8+LsdKe9xldFdwwkfIibPsm/CKOHrERkn6AKwgUaVFSzrUQnhpbt
ufIT+aIS6bRPQh/+kzbR4MEvCwBlh/STQfJAtTxntQlyeoav+3pdAWPeozhEgRXv
/hj7Y86aafORnf1u7TwMB/dtmmWJCeTyn8OPs7JrHe8OGwZRByOLa4FOggt4Loga
ecrow59z+2js5J2Glax4vKNKbJK1NijNQLRyPpWJbxRr/zmBGwwkTBFnoj2gjPHy
RgLLzZQLl0FiLCe0RWy5n7LNtPSnBi8VDLySCFVagPfhxKyt7zDEMvQKthgmoedG
gZ9zLPADvwByeDJAn97IWD8W2PzCJQFlNNbBk/wmBPKWkp1Lew3qD8SUct6YG8Ci
fXXISlkxw8ZNTQxuML+X52Niqm3FOK2ytQuouF+ukqWrkPb/qVdahyxWxr8/RAEF
z0jolQY6ZJCzCygf4ZUH6qmlF6FHwcSpkM4iYtio2oBgLumoQEN5Yj7jwLf2tn3B
NcK4e90Qf9sPROrne23C
=TYY0
-----END PGP SIGNATURE-----

--nextPart1710320.nqVvWTWXMQ--


--===============6950978787587832643==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
--===============6950978787587832643==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Dspam-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspam-devel

--===============6950978787587832643==--