Skip to content

C++: Clean up BufferWrite.qll#3786

Merged
MathiasVP merged 10 commits intogithub:masterfrom
geoffw0:bufferwritecleanup
Jul 1, 2020
Merged

C++: Clean up BufferWrite.qll#3786
MathiasVP merged 10 commits intogithub:masterfrom
geoffw0:bufferwritecleanup

Conversation

@geoffw0
Copy link
Copy Markdown
Contributor

@geoffw0 geoffw0 commented Jun 24, 2020

While working on the QLDoc for BufferWrite.qll, I noticed some places where it could depend more on models (reducing redundancy), and where models can be improved using cases from BufferWrite.qll.

@geoffw0 geoffw0 added the C++ label Jun 24, 2020
@geoffw0 geoffw0 requested a review from a team as a code owner June 24, 2020 17:41
Comment thread cpp/ql/src/semmle/code/cpp/models/implementations/Strcat.qll Outdated
@MathiasVP
Copy link
Copy Markdown
Contributor

Other than the failing ql{doc, format} checks, I think this LGTM! The new test result also looks right to me.

@geoffw0
Copy link
Copy Markdown
Contributor Author

geoffw0 commented Jun 25, 2020

Fixed formatting and fixed the new false positive in UsingStrcpyAsBoolean.ql. It was caused by the query assuming that all strcpy variants return a string, whereas some of the new ones (e.g. strcpy_s) do in fact return an error code so the query doesn't apply to them.

@geoffw0 geoffw0 force-pushed the bufferwritecleanup branch from 5c7d49d to 89bea60 Compare June 25, 2020 10:32
Copy link
Copy Markdown
Contributor

@MathiasVP MathiasVP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants