public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/54845] New: [trunk/gcc/c-family/c-ada-spec.c:3114]: (error) Buffer is accessed out of bounds.
@ 2012-10-07 10:18 dcb314 at hotmail dot com
  2012-10-09 13:43 ` [Bug ada/54845] " charlet at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dcb314 at hotmail dot com @ 2012-10-07 10:18 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54845
           Summary: [trunk/gcc/c-family/c-ada-spec.c:3114]: (error) Buffer
                    is accessed out of bounds.
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dcb314@hotmail.com


I just ran the static analysis checker cppcheck over
the source code of today's trunk.

The checker said

[trunk/gcc/c-family/c-ada-spec.c:3114]: (error) Buffer is accessed out of
bounds.

The source code is

              sprintf (buf, "field_%d : aliased ", field_num + 1);

but 

  char buf[16];

I make that at least 19 chars written into a 16 char buffer.
Suggest increase buf size.


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

* [Bug ada/54845] [trunk/gcc/c-family/c-ada-spec.c:3114]: (error) Buffer is accessed out of bounds.
  2012-10-07 10:18 [Bug ada/54845] New: [trunk/gcc/c-family/c-ada-spec.c:3114]: (error) Buffer is accessed out of bounds dcb314 at hotmail dot com
@ 2012-10-09 13:43 ` charlet at gcc dot gnu.org
  2012-10-10  8:09 ` charlet at gcc dot gnu.org
  2012-10-10  8:13 ` charlet at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: charlet at gcc dot gnu.org @ 2012-10-09 13:43 UTC (permalink / raw)
  To: gcc-bugs


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

Arnaud Charlet <charlet at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |charlet at gcc dot gnu.org
         AssignedTo|unassigned at gcc dot       |charlet at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #1 from Arnaud Charlet <charlet at gcc dot gnu.org> 2012-10-09 13:43:04 UTC ---
Thanks for the report, I'll fix that.


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

* [Bug ada/54845] [trunk/gcc/c-family/c-ada-spec.c:3114]: (error) Buffer is accessed out of bounds.
  2012-10-07 10:18 [Bug ada/54845] New: [trunk/gcc/c-family/c-ada-spec.c:3114]: (error) Buffer is accessed out of bounds dcb314 at hotmail dot com
  2012-10-09 13:43 ` [Bug ada/54845] " charlet at gcc dot gnu.org
@ 2012-10-10  8:09 ` charlet at gcc dot gnu.org
  2012-10-10  8:13 ` charlet at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: charlet at gcc dot gnu.org @ 2012-10-10  8:09 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Arnaud Charlet <charlet at gcc dot gnu.org> 2012-10-10 08:09:33 UTC ---
Author: charlet
Date: Wed Oct 10 08:09:25 2012
New Revision: 192290

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192290
Log:
2012-10-10  Arnaud Charlet  <charlet@adacore.com>

PR ada/54845
    * c-ada-spec.c (print_ada_struct_decl): Increase buf size.


Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-ada-spec.c


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

* [Bug ada/54845] [trunk/gcc/c-family/c-ada-spec.c:3114]: (error) Buffer is accessed out of bounds.
  2012-10-07 10:18 [Bug ada/54845] New: [trunk/gcc/c-family/c-ada-spec.c:3114]: (error) Buffer is accessed out of bounds dcb314 at hotmail dot com
  2012-10-09 13:43 ` [Bug ada/54845] " charlet at gcc dot gnu.org
  2012-10-10  8:09 ` charlet at gcc dot gnu.org
@ 2012-10-10  8:13 ` charlet at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: charlet at gcc dot gnu.org @ 2012-10-10  8:13 UTC (permalink / raw)
  To: gcc-bugs


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

Arnaud Charlet <charlet at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Arnaud Charlet <charlet at gcc dot gnu.org> 2012-10-10 08:12:52 UTC ---
Fixed, thanks for your report.


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

end of thread, other threads:[~2012-10-10  8:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-07 10:18 [Bug ada/54845] New: [trunk/gcc/c-family/c-ada-spec.c:3114]: (error) Buffer is accessed out of bounds dcb314 at hotmail dot com
2012-10-09 13:43 ` [Bug ada/54845] " charlet at gcc dot gnu.org
2012-10-10  8:09 ` charlet at gcc dot gnu.org
2012-10-10  8:13 ` charlet at gcc dot gnu.org

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