Coverty: Limit the strcpy to the maximum length of the destination.
This commit was SVN r16107.
Этот коммит содержится в:
родитель
bfb4ddc3e2
Коммит
7b3dcff267
@ -490,7 +490,7 @@ GOTNAME:
|
|||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
strcpy(component.mca_type_name, ptr);
|
strncpy(component.mca_type_name, ptr, MCA_BASE_MAX_COMPONENT_NAME_LEN);
|
||||||
free(ptr);
|
free(ptr);
|
||||||
|
|
||||||
cnt = 1;
|
cnt = 1;
|
||||||
@ -498,7 +498,7 @@ GOTNAME:
|
|||||||
ORTE_ERROR_LOG(rc);
|
ORTE_ERROR_LOG(rc);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
strcpy(component.mca_component_name, ptr);
|
strncpy(component.mca_component_name, ptr, MCA_BASE_MAX_COMPONENT_NAME_LEN);
|
||||||
free(ptr);
|
free(ptr);
|
||||||
|
|
||||||
cnt = 1;
|
cnt = 1;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user