mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-24 11:46:34 +00:00
Replace strlcpy with strncpy
This commit is contained in:
parent
0dc6e58b86
commit
9a17e70daf
@ -180,8 +180,7 @@ void Page::set_name(uint8_t pageid, const char* name)
|
||||
_pagenames[pageid] = (char*)hasp_calloc(sizeof(char), size);
|
||||
LOG_VERBOSE(TAG_HASP, F("%s - %d"), __FILE__, __LINE__);
|
||||
if(_pagenames[pageid] == NULL) return;
|
||||
memset(_pagenames[pageid], 0, size);
|
||||
strlcpy(_pagenames[pageid], name, size);
|
||||
strncpy(_pagenames[pageid], name, size);
|
||||
LOG_VERBOSE(TAG_HASP, F("%s"), _pagenames[pageid]);
|
||||
}
|
||||
LOG_VERBOSE(TAG_HASP, F("%s - %d"), __FILE__, __LINE__);
|
||||
|
Loading…
x
Reference in New Issue
Block a user