1
1

Protect array against crossing boundaries

cmr=v1.7.5:reviewer=jsquyres

This commit was SVN r30316.
Этот коммит содержится в:
Ralph Castain 2014-01-17 21:36:20 +00:00
родитель c1ba8c1219
Коммит 87f34860fe

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

@ -942,6 +942,10 @@ static int link_archive(orte_filem_raw_incoming_t *inbnd)
"%s filem:raw: path %s", "%s filem:raw: path %s",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
path)); path));
/* protect against an empty result */
if (0 == strlen(path)) {
continue;
}
/* trim the trailing cr */ /* trim the trailing cr */
path[strlen(path)-1] = '\0'; path[strlen(path)-1] = '\0';
/* ignore directories */ /* ignore directories */