public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/52758] New: libgfortran/intrinsics/chmod.c: Array index out of bounds
@ 2012-03-28 21:41 dcb314 at hotmail dot com
  2012-03-30 11:14 ` [Bug libfortran/52758] " uros at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dcb314 at hotmail dot com @ 2012-03-28 21:41 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-30 15:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-28 21:41 [Bug libfortran/52758] New: libgfortran/intrinsics/chmod.c: Array index out of bounds dcb314 at hotmail dot com
2012-03-30 11:14 ` [Bug libfortran/52758] " uros at gcc dot gnu.org
2012-03-30 15:40 ` uros at gcc dot gnu.org
2012-03-30 15:43 ` ubizjak at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).