wrong length check

This commit is contained in:
Wolfgang Hottgenroth 2020-12-14 20:47:00 +01:00
parent 64999eaefc
commit f91cefb3bf

View File

@ -60,7 +60,7 @@ static bool setStringParameterCmd(uint8_t argc, char **args, size_t offset) {
t_configBlock configBlock; t_configBlock configBlock;
char *parameterName = args[1]; char *parameterName = args[1];
char *newParameterValue = args[2]; char *newParameterValue = args[2];
if (strlen(newParameterValue) >= sizeof(configBlock.deviceName)) { if (strlen(newParameterValue) >= sizeof(configBlock.deviceName)) { // FIXME
sendFormatString("given new value for %s is too long\n\r", parameterName); sendFormatString("given new value for %s is too long\n\r", parameterName);
retCode = false; retCode = false;
} else { } else {