public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/60547] New: libcilkrts/runtime/record-replay.cpp: 2 * possible problems in calls to scanf ?
@ 2014-03-17  8:06 dcb314 at hotmail dot com
  2014-03-17  8:18 ` [Bug other/60547] " dcb314 at hotmail dot com
  2014-03-17  8:27 ` pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: dcb314 at hotmail dot com @ 2014-03-17  8:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60547
           Summary: libcilkrts/runtime/record-replay.cpp: 2 * possible
                    problems in calls to scanf ?
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com

Static analyser cppcheck says

1.

[libcilkrts/runtime/record-replay.cpp:561]: (warning) scanf without field width 
limits can crash with huge input data.

Source code is

        fret = fscanf(f, "%s %s %d %d\n", ped_type, ped_str, &i1, &i2);

but

    char ped_type[PED_TYPE_SIZE];

It might be worthwhile to limit the %s to PED_TYPE_SIZE

2.

[libcilkrts/runtime/record-replay.cpp:569]: (warning) scanf without field width 
limits can crash with huge input data.

Duplicate.


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

* [Bug other/60547] libcilkrts/runtime/record-replay.cpp: 2 * possible problems in calls to scanf ?
  2014-03-17  8:06 [Bug other/60547] New: libcilkrts/runtime/record-replay.cpp: 2 * possible problems in calls to scanf ? dcb314 at hotmail dot com
@ 2014-03-17  8:18 ` dcb314 at hotmail dot com
  2014-03-17  8:27 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: dcb314 at hotmail dot com @ 2014-03-17  8:18 UTC (permalink / raw)
  To: gcc-bugs

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

David Binderman <dcb314 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor


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

* [Bug other/60547] libcilkrts/runtime/record-replay.cpp: 2 * possible problems in calls to scanf ?
  2014-03-17  8:06 [Bug other/60547] New: libcilkrts/runtime/record-replay.cpp: 2 * possible problems in calls to scanf ? dcb314 at hotmail dot com
  2014-03-17  8:18 ` [Bug other/60547] " dcb314 at hotmail dot com
@ 2014-03-17  8:27 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-03-17  8:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This code is never used unless you turn on the code manually.


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

end of thread, other threads:[~2014-03-17  8:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-17  8:06 [Bug other/60547] New: libcilkrts/runtime/record-replay.cpp: 2 * possible problems in calls to scanf ? dcb314 at hotmail dot com
2014-03-17  8:18 ` [Bug other/60547] " dcb314 at hotmail dot com
2014-03-17  8:27 ` pinskia 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).