* Fix a couple potential buffer overflows.
This commit is contained in:
parent
346ff6e293
commit
c441187d2a
@ -200,7 +200,7 @@ _make_composite_tags(struct song_metadata *psong)
|
|||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
len = 0;
|
len = 1;
|
||||||
|
|
||||||
if(!psong->contributor[ROLE_ARTIST] &&
|
if(!psong->contributor[ROLE_ARTIST] &&
|
||||||
(psong->contributor[ROLE_BAND] || psong->contributor[ROLE_CONDUCTOR]))
|
(psong->contributor[ROLE_BAND] || psong->contributor[ROLE_CONDUCTOR]))
|
||||||
|
@ -30,7 +30,7 @@ NameValueParserGetData(void * d, const char * datas, int l)
|
|||||||
nv = malloc(sizeof(struct NameValue));
|
nv = malloc(sizeof(struct NameValue));
|
||||||
if(l>511)
|
if(l>511)
|
||||||
l = 511;
|
l = 511;
|
||||||
strncpy(nv->name, data->curelt, 512);
|
strncpy(nv->name, data->curelt, 64);
|
||||||
nv->name[63] = '\0';
|
nv->name[63] = '\0';
|
||||||
memcpy(nv->value, datas, l);
|
memcpy(nv->value, datas, l);
|
||||||
nv->value[l] = '\0';
|
nv->value[l] = '\0';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user