-
Notifications
You must be signed in to change notification settings - Fork 8k
Fix format specifiers and arguments in com_dotnet #15398
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
Conversation
This is mostly about minor glitches (signedness or length confusion), but also fixes two occasions where `zend_string` still have be regarded as `char *`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Surprised this didn't cause issues before.
Surprised this didn't cause issues before.
Well, I assume that is because
- com_dotnet is rarely used
- most of the issues are minor (signedness, length)
- a couple of the mismatches are used in
trace()
which will only output something, when attached to a debugger
I've now added a test for the only issue I consider a problem, but this also only happens if you try to access a property of a COM object, which is unknown; you fix that code, and go on with life.
Surprised this didn't cause issues before.
Well, I assume that is because
- com_dotnet is rarely used
- most of the issues are minor (signedness, length)
- a couple of the mismatches are used in
trace()
which will only output something, when attached to a debuggerI've now added a test for the only issue I consider a problem, but this also only happens if you try to access a property of a COM object, which is unknown; you fix that code, and go on with life.
PS: forgot to mention that there couldn't be any real OOB reads, due to the layout of zend_string
and the fact that its val
is always zero terminated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the added test!
This is mostly about minor glitches (signedness or length confusion), but also fixes two occasions where
zend_string
still have be regarded aschar *
.clang (16.0.0) was very helpful with this.