Fix a tiny buffer overflow.

This commit is contained in:
Christopher Brannon 2015-11-23 12:28:00 -08:00
parent f567088a68
commit 1ef5ba7968

View file

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