diff --git a/main/safety.c b/main/safety.c index db60a87..53ca250 100644 --- a/main/safety.c +++ b/main/safety.c @@ -143,7 +143,7 @@ void getSensorSanityStates(sSensorSanityCheck *pSensorSanityChecks) { // Copy only the needed attributes pSensorSanityChecks[i].state = sanityChecks[i].state; - strcpy(pSensorSanityChecks[i].name, sanityChecks[i].name); + strncpy(pSensorSanityChecks[i].name, sanityChecks[i].name, MAX_ERROR_STRING_SIZE); } xSemaphoreGiveRecursive(xMutexAccessSafety); }