* Fix a couple potential buffer overflows.

This commit is contained in:
Justin Maggard
2010-01-28 20:26:38 +00:00
parent 346ff6e293
commit c441187d2a
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ NameValueParserGetData(void * d, const char * datas, int l)
nv = malloc(sizeof(struct NameValue));
if(l>511)
l = 511;
strncpy(nv->name, data->curelt, 512);
strncpy(nv->name, data->curelt, 64);
nv->name[63] = '\0';
memcpy(nv->value, datas, l);
nv->value[l] = '\0';