This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
build/2466: Fails to build with -D_FORTIFY_SOURCE=2 due to unchecked fgets usage
- From: jw+debian at jameswestby dot net
- To: gdb-gnats at sources dot redhat dot com
- Date: 11 Jun 2008 17:31:31 -0000
- Subject: build/2466: Fails to build with -D_FORTIFY_SOURCE=2 due to unchecked fgets usage
- Reply-to: jw+debian at jameswestby dot net
>Number: 2466
>Category: build
>Synopsis: Fails to build with -D_FORTIFY_SOURCE=2 due to unchecked fgets usage
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Jun 11 17:38:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: jw+debian@jameswestby.net
>Release: 6.8
>Organization:
>Environment:
Ubuntu Intrepid, gcc 4.2.3
>Description:
Hi,
I am trying to rebuild gdb under Ubuntu Intrepid, which makes
-D_FORTIFY_SOURCE=2 default when building packages, and this causes gdb to fail to build.
The problem is in linux-nat.c, line 2879, where there is an unchecked "fgets()" call. I can still see the same line in
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/linux-nat.c?rev=1.86&content-type=text/x-cvsweb-markup&cvsroot=src
I'm not submitting a patch, as I'm not sure what an appropriate course of action would be if this fgets was
to fail.
Thanks,
James
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: