1
1

Not sure how we could get to this point without having already detected the error, but just to be safe - check for end-of-array and return if error.

Refs trac:4897

This commit was SVN r32731.

The following Trac tickets were found above:
  Ticket 4897 --> https://svn.open-mpi.org/trac/ompi/ticket/4897
Этот коммит содержится в:
Ralph Castain 2014-09-13 02:23:30 +00:00
родитель e95ed94a94
Коммит fad4384463

Просмотреть файл

@ -208,6 +208,12 @@ void mca_base_cmd_line_wrap_args(char **args)
for (i=0; NULL != args && NULL != args[i]; i++) {
if (0 == strcmp(args[i], "-mca") ||
0 == strcmp(args[i], "--mca")) {
if (NULL == args[i+1] || NULL == args[i+2]) {
/* this should be impossible as the error would
* have been detected well before here, but just
* be safe */
return;
}
i += 2;
asprintf(&tstr, "\"%s\"", args[i]);
free(args[i]);