* g++spec.c (lang_specific_driver): Add room for NULL in arglist.

From-SVN: r28812
This commit is contained in:
Mumit Khan 1999-08-24 04:20:18 +00:00 committed by Jeff Law
parent bbd0d54ab3
commit 732d9b8ce2
2 changed files with 6 additions and 1 deletions

View File

@ -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.

View File

@ -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. */