diff options
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/g++spec.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 77deef6d25b..8ceb65995c0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu> + + * g++spec.c (lang_specific_driver): Add room for NULL in arglist. + 1999-08-23 Jason Merrill <jason@yorick.cygnus.com> * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2. diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c index 806b90ea96f..7e4d49cf014 100644 --- a/gcc/cp/g++spec.c +++ b/gcc/cp/g++spec.c @@ -197,7 +197,8 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries) return; } - num_args = argc + added + need_math; + /* Make sure to have room for the trailing NULL argument. */ + num_args = argc + added + need_math + 1; arglist = (char **) xmalloc (num_args * sizeof (char *)); /* NOTE: We start at 1 now, not 0. */ |