From MAILER-DAEMON Mon Dec 12 10:40:07 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ra7z5-0003Fo-UF
	for mharc-bug-commoncpp@gnu.org; Mon, 12 Dec 2011 10:40:07 -0500
Received: from eggs.gnu.org ([140.186.70.92]:50279)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dcb314@hotmail.com>) id 1RZgk6-0005di-6J
	for bug-commoncpp@gnu.org; Sun, 11 Dec 2011 05:34:51 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <dcb314@hotmail.com>) id 1RZgk5-0000rT-5l
	for bug-commoncpp@gnu.org; Sun, 11 Dec 2011 05:34:50 -0500
Received: from blu0-omc1-s32.blu0.hotmail.com ([65.55.116.43]:52799)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <dcb314@hotmail.com>) id 1RZgk5-0000rF-1H
	for bug-commoncpp@gnu.org; Sun, 11 Dec 2011 05:34:49 -0500
Received: from BLU154-W23 ([65.55.116.8]) by blu0-omc1-s32.blu0.hotmail.com
	with Microsoft SMTPSVC(6.0.3790.4675); 
	Sun, 11 Dec 2011 02:34:47 -0800
Message-ID: <BLU154-W23957B97303A87598BD8249CBF0@phx.gbl>
Content-Type: multipart/alternative;
	boundary="_411aad8b-b744-46cd-a7ce-06daf1ace042_"
X-Originating-IP: [86.190.4.27]
From: David Binderman <dcb314@hotmail.com>
To: <bug-commoncpp@gnu.org>
Subject: commoncpp2-1.7.3 bug report
Date: Sun, 11 Dec 2011 10:34:47 +0000
Importance: Normal
MIME-Version: 1.0
X-OriginalArrivalTime: 11 Dec 2011 10:34:47.0089 (UTC)
	FILETIME=[80FB5210:01CCB7F0]
X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP4, XP SP1+
X-Received-From: 65.55.116.43
X-Mailman-Approved-At: Mon, 12 Dec 2011 10:40:06 -0500
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 11 Dec 2011 10:34:51 -0000

--_411aad8b-b744-46cd-a7ce-06daf1ace042_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



hello there=2C

I just compiled the commoncpp package with compiler flag
-D_FORTIFY_SOURCE=3D2. It said

In function 'void* memset(void*=2C int=2C size_t)'=2C
    inlined from 'void ost::IPV4Address::setAddress(const char*)' at inaddr=
.cpp:332:49:
/usr/include/bits/string3.h:85:70: warning: call to void* __builtin___memse=
t_chk(void*=2C int=2C long unsigned int=2C long unsigned int) will always o=
verflow destination buffer [enabled by default]

The source code is

            memset((void *)&ipaddr[0]=2C 0=2C sizeof(ipaddr))=3B

You might be better off with

            memset((void *)&ipaddr[0]=2C 0=2C sizeof(*ipaddr))=3B

Regards

David Binderman


 		 	   		  =

--_411aad8b-b744-46cd-a7ce-06daf1ace042_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Tahoma
}
--></style></head>
<body class=3D'hmmessage'><div dir=3D'ltr'>
<br>hello there=2C<br><br>I just compiled the commoncpp package with compil=
er flag<br>-D_FORTIFY_SOURCE=3D2. It said<br><br>In function 'void* memset(=
void*=2C int=2C size_t)'=2C<br>&nbsp=3B&nbsp=3B&nbsp=3B inlined from 'void =
ost::IPV4Address::setAddress(const char*)' at inaddr.cpp:332:49:<br>/usr/in=
clude/bits/string3.h:85:70: warning: call to void* __builtin___memset_chk(v=
oid*=2C int=2C long unsigned int=2C long unsigned int) will always overflow=
 destination buffer [enabled by default]<br><br>The source code is<br><br>&=
nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbs=
p=3B&nbsp=3B memset((void *)&amp=3Bipaddr[0]=2C 0=2C sizeof(ipaddr))=3B<br>=
<br>You might be better off with<br><br>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nb=
sp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B memset((void *)&amp=
=3Bipaddr[0]=2C 0=2C sizeof(*ipaddr))=3B<br><br>Regards<br><br>David Binder=
man<br><br><br> 		 	   		  </div></body>
</html>=

--_411aad8b-b744-46cd-a7ce-06daf1ace042_--


From MAILER-DAEMON Sat Dec 17 09:38:37 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RbvPJ-0001u0-VJ
	for mharc-bug-commoncpp@gnu.org; Sat, 17 Dec 2011 09:38:37 -0500
Received: from eggs.gnu.org ([140.186.70.92]:39538)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ha@igh-essen.com>) id 1RbWzf-0006QV-Q2
	for bug-commoncpp@gnu.org; Fri, 16 Dec 2011 07:34:35 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <ha@igh-essen.com>) id 1RbWzZ-0003t9-Tp
	for bug-commoncpp@gnu.org; Fri, 16 Dec 2011 07:34:31 -0500
Received: from mailoutvans02.telekom-dienste.de ([62.153.159.241]:38385)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <ha@igh-essen.com>) id 1RbWzZ-0003rZ-OR
	for bug-commoncpp@gnu.org; Fri, 16 Dec 2011 07:34:25 -0500
Received: from fwd21.aul.t-online.de (fwd21.aul.t-online.de )
	by mailoutvans02.telekom-dienste.de with smtp 
	id 1RbWzS-0007ql-0O; Fri, 16 Dec 2011 13:34:18 +0100
Received: from yak.igh-essen.int
	(Tly+bMZV8tHWvx-kJDNd0xc7Z1ol58UCl9OlTmpaN+q3fchXq5NmMt3DbhJaZxS61SEN81jIoK@[217.91.21.65])
	by fwd21.webpage.t-com.de
	with esmtp id 1RbWzJ-0KkMmu0; Fri, 16 Dec 2011 13:34:09 +0100
Received: from zuse.localnet (zuse.igh-essen.int [192.168.4.28])
	by yak.igh-essen.int (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id
	pBGCY8MT024531
	for <bug-commoncpp@gnu.org>; Fri, 16 Dec 2011 13:34:08 +0100
From: Richard Hacker <ha@igh-essen.com>
Organization: IgH GmbH
To: bug-commoncpp@gnu.org
Subject: Patch: SockExcpetion getSystemErrorString() method gives unexpected
	result
Date: Fri, 16 Dec 2011 13:34:07 +0100
User-Agent: KMail/1.12.4 (Linux/2.6.31.12-0.2-desktop; KDE/4.3.5; x86_64; ; )
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Message-Id: <201112161334.08000.ha@igh-essen.com>
X-ID: Tly+bMZV8tHWvx-kJDNd0xc7Z1ol58UCl9OlTmpaN+q3fchXq5NmMt3DbhJaZxS61SEN81jIoK
X-TOI-MSGID: 55f41a5b-0953-42bd-9a4e-9d566af29da8
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 62.153.159.241
X-Mailman-Approved-At: Sat, 17 Dec 2011 09:38:36 -0500
X-BeenThere: bug-commoncpp@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Bug reports for Common C++ <bug-commoncpp.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-commoncpp>
List-Post: <mailto:bug-commoncpp@gnu.org>
List-Help: <mailto:bug-commoncpp-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-commoncpp>,
	<mailto:bug-commoncpp-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 16 Dec 2011 12:34:36 -0000

Hi,

here is a patch for the above issue. I hope someone picks this up and inclu=
des=20
it.

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
=2D-- commoncpp2-1.3.8/src/exception.cpp.orig     2011-12-16 12:22:42.00000=
0000=20
+0100
+++ commoncpp2-1.3.8/src/exception.cpp  2011-12-16 12:25:29.000000000 +0100
@@ -85,8 +85,13 @@
        if ( !_systemErrorString )
                _systemErrorString =3D new char[errStrSize];
 #ifndef WIN32
+#if (_POSIX_C_SOURCE >=3D 200112L || _XOPEN_SOURCE >=3D 600) \
+        && ! _GNU_SOURCE
        strerror_r(_systemError, _systemErrorString, errStrSize);
        return _systemErrorString;
+#else
+       return strerror_r(_systemError, _systemErrorString, errStrSize);
+#endif
=20
 #else
        FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM, NULL, _systemError,
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Mit freundlichem Gru=DF

Richard Hacker

=2D-=20
=2D-----------------------------------------------------------------------

Richard Hacker M.Sc.=20
richard.hacker@igh-essen.com
Tel.: +49 201 / 36014-16

Ingenieurgemeinschaft IgH
Gesellschaft f=FCr Ingenieurleistungen mbH
Heinz-B=E4cker-Str. 34
D-45356 Essen
Amtsgericht Essen HRB 11500
USt-Id.-Nr.: DE 174 626 722
Gesch=E4ftsf=FChrung:=20
=2D Dr.-Ing. S. Rotth=E4user,=20
=2D Dr.-Ing. T. Finke,=20
=2D Dr.-Ing. W. Hagemeister
Tel.: +49 201 / 360-14-0
http://www.igh-essen.com

=2D-----------------------------------------------------------------------


