Update of /cvsroot/openvrml/openvrml/mozilla-plugin/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5967/mozilla-plugin/src
Modified Files:
openvrml.cpp
Log Message:
Use g_malloc0 to zero-initialize the allocated memory for openvrml_player_cmd_argv.
Index: openvrml.cpp
===================================================================
RCS file: /cvsroot/openvrml/openvrml/mozilla-plugin/src/openvrml.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** openvrml.cpp 23 Jul 2006 05:43:12 -0000 1.34
--- openvrml.cpp 23 Jul 2006 07:27:47 -0000 1.35
***************
*** 1066,1070 ****
// path to the child process executable. To allow OPENVRML_PLAYER
// to include arguments (rather than just be a path to an
! // executable), it is parsed wit g_shell_parse_argv. This is
// particularly useful in case we want to run the child process in
// a harness like valgrind.
--- 1066,1070 ----
// path to the child process executable. To allow OPENVRML_PLAYER
// to include arguments (rather than just be a path to an
! // executable), it is parsed with g_shell_parse_argv. This is
// particularly useful in case we want to run the child process in
// a harness like valgrind.
***************
*** 1077,1085 ****
openvrml_player_cmd_argc = 1;
openvrml_player_cmd_argv =
! static_cast<gchar **>(g_malloc(sizeof (gchar *) * 2));
if (!openvrml_player_cmd_argv) { throw std::bad_alloc(); }
openvrml_player_cmd_argv[0] =
g_strdup(OPENVRML_LIBEXECDIR_ "/openvrml-player");
- openvrml_player_cmd_argv[1] = 0;
if (!openvrml_player_cmd_argv[0]) { throw std::bad_alloc(); }
} else {
--- 1077,1084 ----
openvrml_player_cmd_argc = 1;
openvrml_player_cmd_argv =
! static_cast<gchar **>(g_malloc0(sizeof (gchar *) * 2));
if (!openvrml_player_cmd_argv) { throw std::bad_alloc(); }
openvrml_player_cmd_argv[0] =
g_strdup(OPENVRML_LIBEXECDIR_ "/openvrml-player");
if (!openvrml_player_cmd_argv[0]) { throw std::bad_alloc(); }
} else {
|