Skip to content

Commit 1ef5ba7

Browse files
committed
Fix a tiny buffer overflow.
1 parent f567088 commit 1ef5ba7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/attrs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2228,7 +2228,7 @@ void CheckRDFaPrefix ( TidyDocImpl* doc, Node *node, AttVal *attval)
22282228
/* Copy it over */
22292229

22302230
uint len = TY_(tmbstrlen)(attval->value);
2231-
tmbstr s = (tmbstr) TidyDocAlloc( doc, len );
2231+
tmbstr s = (tmbstr) TidyDocAlloc( doc, len + 1 );
22322232
s[0] = '\0';
22332233
TY_(tmbstrcpy)( s, attval->value );
22342234

0 commit comments

Comments
 (0)