This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/80047] fixincludes/fixincl.c: PVS-Studio: Improper Release of Memory Before Removing Last Reference (CWE-401)


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80047

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|other                       |bootstrap

--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
Patch posted for review:
https://gcc.gnu.org/ml/gcc-patches/2017-03/msg00853.html

(In reply to Andrew Pinski from comment #2)
> >char cwdbuf[MAXPATHLEN];
> 
> This is not a GNU style thing.  GNU style mentions against using arbitrary
> limits.

There are existing uses of MAXPATHLEN to declare local arrays in this file
(create_file, quoted_file_exists) so this one doesn't make things any worse
than they already are.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]