We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src/tmbstr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tmbstr.c b/src/tmbstr.c index e352698..447c6dd 100644 --- a/src/tmbstr.c +++ b/src/tmbstr.c @@ -255,7 +255,7 @@ void TY_(strrep)(tmbstr buffer, ctmbstr str, ctmbstr rep) if(p) { char buf[1024]; - memset(buf,'\0',strlen(buf)); + memset(buf,'\0',sizeof(buf)); if(buffer == p) {
if use vc to build the solution with debug config, and call tidyRunDiagnostics with the html in the attachment zip file, will trigger the problem.
The text was updated successfully, but these errors were encountered:
Fix memset'ing of buffer in strrep
df5bc80
`strlen(buf)` is not guaranteed to return the size of the buffer, as it might contain some null bytes in the middle. Fixes htacg#1001
Successfully merging a pull request may close this issue.
if use vc to build the solution with debug config, and call tidyRunDiagnostics with the html in the attachment zip file, will trigger the problem.
The text was updated successfully, but these errors were encountered: