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

* [Bug libfortran/52758] libgfortran/intrinsics/chmod.c: Array index out of bounds
  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 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: uros at gcc dot gnu.org @ 2012-03-30 11:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52758

--- Comment #1 from uros at gcc dot gnu.org 2012-03-30 11:07:51 UTC ---
Author: uros
Date: Fri Mar 30 11:07:46 2012
New Revision: 186008

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186008
Log:
    PR libgfortran/52758
    * intrinsics/chmod.c: Remove out-of-bound initialization of rwxXstugo.


Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/intrinsics/chmod.c


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

* [Bug libfortran/52758] libgfortran/intrinsics/chmod.c: Array index out of bounds
  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
  2 siblings, 0 replies; 4+ messages in thread
From: uros at gcc dot gnu.org @ 2012-03-30 15:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52758

--- Comment #2 from uros at gcc dot gnu.org 2012-03-30 15:37:58 UTC ---
Author: uros
Date: Fri Mar 30 15:37:51 2012
New Revision: 186014

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186014
Log:
    PR libgfortran/52758
    * intrinsics/chmod.c (chmod_func): Remove out-of-bounds
    initialization of rwxXstugo.


Modified:
    branches/gcc-4_7-branch/libgfortran/ChangeLog
    branches/gcc-4_7-branch/libgfortran/intrinsics/chmod.c


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

* [Bug libfortran/52758] libgfortran/intrinsics/chmod.c: Array index out of bounds
  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
  2 siblings, 0 replies; 4+ messages in thread
From: ubizjak at gmail dot com @ 2012-03-30 15:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52758

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.1

--- Comment #3 from Uros Bizjak <ubizjak at gmail dot com> 2012-03-30 15:39:51 UTC ---
Fixed.


^ 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).