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 ada/71358] GNAT.Command_Line.Getopt fails if there are no switches


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

--- Comment #6 from pmderodat at gcc dot gnu.org ---
Author: pmderodat
Date: Mon Sep 18 08:43:37 2017
New Revision: 252909

URL: https://gcc.gnu.org/viewcvs?rev=252909&root=gcc&view=rev
Log:
2017-09-18  Bob Duff  <duff@adacore.com>

        Alternate fix for PR ada/71358
        * libgnat/g-comlin.adb (Getopt): Remove manual null access checks.
        Instead, make a local copy of Config, and if it's null, allocate an
        empty Command_Line_Configuration_Record, so we won't crash on null
        pointer dereference.


Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/libgnat/g-comlin.adb

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