Merge pull request #319 from CMB/memfix

Fix a tiny buffer overflow.
This commit is contained in:
Geoff McLane 2015-11-24 19:21:28 +01:00
commit b8e4f6e21e
1 changed files with 1 additions and 1 deletions

View File

@ -2228,7 +2228,7 @@ void CheckRDFaPrefix ( TidyDocImpl* doc, Node *node, AttVal *attval)
/* Copy it over */
uint len = TY_(tmbstrlen)(attval->value);
tmbstr s = (tmbstr) TidyDocAlloc( doc, len );
tmbstr s = (tmbstr) TidyDocAlloc( doc, len + 1 );
s[0] = '\0';
TY_(tmbstrcpy)( s, attval->value );