1
1

Need one additional space for the case that the path is relative

This commit was SVN r14870.
Этот коммит содержится в:
Tim Prins 2007-06-05 14:50:15 +00:00
родитель efa74f7bfe
Коммит f3e13f7231

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

@ -70,6 +70,10 @@ char *opal_os_path(bool relative, ...)
/* setup path with enough room for the string terminator, the elements, and
the separator between each of the elements */
total_length = total_length + num_elements * strlen(path_sep) + 1;
if(relative) {
total_length++;
}
if (total_length > MAXPATHLEN) { /* path length is too long - reject it */
return(NULL);
}