> When GRTAGS doesn't exist, incremental updating causes NULL pointer access. 
> 
> $ mkdir a
> $ cd a
> $ gtags
> $ rm GRTAGS
> $ touch a.c
> $ gtags -i
> Segmentation fault (core dumped)

Thank you.
If the command layer parser becomes discontinued, I would like to fix the buf 
like this.

Change:
=======
[main() in gtags.c]

        if (iflag && (!test("f", makepath(dbpath, dbname(GTAGS), NULL)) ||
                !test("f", makepath(dbpath, dbname(GRTAGS), NULL)) ||       <= 
ADDED
                !test("f", makepath(dbpath, dbname(GPATH), NULL)))) {
                if (wflag)
                        warning("GTAGS, GRTAGS or GPATH not found. -i option 
ignored."); <= CHANGED
                iflag = 0;
        }

The result:
===========

$ gtags -wi
Warning: GTAGS, GRTAGS or GPATH not found. -i option ignored.
$ _

--
Shigio YAMAGUCHI <[email protected]>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

_______________________________________________
Bug-global mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-global

Reply via email to