1
1

Coverty: Limit the strcpy to the maximum length of the destination.

This commit was SVN r16107.
Этот коммит содержится в:
George Bosilca 2007-09-12 18:03:53 +00:00
родитель bfb4ddc3e2
Коммит 7b3dcff267

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

@ -490,7 +490,7 @@ GOTNAME:
ORTE_ERROR_LOG(rc);
continue;
}
strcpy(component.mca_type_name, ptr);
strncpy(component.mca_type_name, ptr, MCA_BASE_MAX_COMPONENT_NAME_LEN);
free(ptr);
cnt = 1;
@ -498,7 +498,7 @@ GOTNAME:
ORTE_ERROR_LOG(rc);
continue;
}
strcpy(component.mca_component_name, ptr);
strncpy(component.mca_component_name, ptr, MCA_BASE_MAX_COMPONENT_NAME_LEN);
free(ptr);
cnt = 1;