This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/52758] New: libgfortran/intrinsics/chmod.c: Array index out of bounds
- From: "dcb314 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 28 Mar 2012 20:57:22 +0000
- Subject: [Bug libfortran/52758] New: libgfortran/intrinsics/chmod.c: Array index out of bounds
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52758
Bug #: 52758
Summary: libgfortran/intrinsics/chmod.c: Array index out of
bounds
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dcb314@hotmail.com
I just tried to analyse the source code of
trunk 20120328 with static analysis tool cppcheck.
The cppcheck said
[libgfortran/intrinsics/chmod.c:144]: (error) Array 'rwxXstugo[9]' index 9 out
of bounds
Source code is
rwxXstugo[9] = false;
but
bool rwxXstugo[9];
I am surprised the usual gcc checks don't catch this.