- lib/parse_opts.c (parse_opts): Initialize allocated string to prevent heap
corruption. - Egor Duda <deo@logos-m.ru>
- Cleaned up some comments in usctest.h
diff --git a/lib/parse_opts.c b/lib/parse_opts.c
index c8b1e1e..f59d8d1 100644
--- a/lib/parse_opts.c
+++ b/lib/parse_opts.c
@@ -30,7 +30,7 @@
* http://oss.sgi.com/projects/GenInfo/NoticeExplan/
*/
-/* $Id: parse_opts.c,v 1.3 2000/08/31 18:40:28 nstraz Exp $ */
+/* $Id: parse_opts.c,v 1.4 2000/09/06 14:33:29 nstraz Exp $ */
/**********************************************************
*
@@ -232,6 +232,8 @@
if (!optionstr)
return "parse_opts: ERROR - Could not allocate memory for optionstr";
+ optionstr[0] = '\0';
+
for (i = 0; std_options[i].optstr; ++i)
strcat(optionstr, std_options[i].optstr);
if (user_optarr)