Fix buffer size
This commit is contained in:
parent
4e2a5b603d
commit
8bdba6f2a5
|
@ -422,12 +422,12 @@ char * TInfo::valueGet(char * name, char * value)
|
|||
me = me->next;
|
||||
|
||||
// Check if we match this LABEL
|
||||
if (lgname==strlen(me->name) && strncmp(me->name, name, lgname)==0) {
|
||||
if (lgname==strlen(me->name) && strcmp(me->name, name)==0) {
|
||||
// this one has a value ?
|
||||
if (me->value) {
|
||||
// copy to dest buffer
|
||||
uint8_t lgvalue = strlen(me->value);
|
||||
strlcpy(value, me->value , lgvalue );
|
||||
strlcpy(value, me->value , lgvalue + 1 );
|
||||
return ( value );
|
||||
}
|
||||
}
|
||||
|
@ -662,7 +662,7 @@ ValueList * TInfo::checkLine(char * pline)
|
|||
return NULL;
|
||||
|
||||
// Get our own working copy
|
||||
strlcpy( buff, _recv_buff, len+1);
|
||||
strlcpy( buff, pline, len+1);
|
||||
|
||||
p = &buff[0];
|
||||
ptok = p; // for sure we start with token name
|
||||
|
|
Loading…
Reference in New Issue