Skip to content

Commit b8e4f6e

Browse files
committed
Merge pull request #319 from CMB/memfix
Fix a tiny buffer overflow.
2 parents f567088 + 1ef5ba7 commit b8e4f6e

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)