Skip to content
New issue

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

htmltidy.c example Assertion failed #7860

StathisKap opened this issue Oct 14, 2021 · 0 comments

htmltidy.c example Assertion failed #7860

StathisKap opened this issue Oct 14, 2021 · 0 comments


Copy link

I just copied and pasted the code to an Ubuntu VM using WSL, and when I compile it I get this warning

htmltidy.c: In function ‘dumpNode’:
htmltidy.c:56:9: warning: format not a string literal and no format arguments [-Wformat-security]
   56 |         printf(tidyAttrName(attr));
      |         ^~~~~~

and when I run the binary I get:

example: /build/tidy-html5-_lVTuO/tidy-html5-5.6.0/src/config.c:485: prvTidySetOptionInt: Assertion `option_defs[ optId ].type == TidyInteger' failed.
Aborted (core dumped)

(same happens when I comment out the printf that causes the warning)

@bagder bagder self-assigned this Oct 15, 2021
bagder added a commit that referenced this issue Oct 15, 2021
... and update the includes to match how current htmltidy wants them

Reported-by: Stathis Kapnidis
Fixes #7860
@bagder bagder closed this as completed in b75045a Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Successfully merging a pull request may close this issue.

2 participants