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
In NDisDriver.c, line 1531 the following code will always evaluate to 0:
tag_us = (qinfo.TagHeader.UserPriority & 0x07 << 13) | (qinfo.TagHeader.CanonicalFormatId & 0x01 << 12) | (qinfo.TagHeader.VlanId & 0x0FFF);
This is because the shift operations take precedence over the and operations. To correct this, add parenthesis as such:
tag_us = ((qinfo.TagHeader.UserPriority & 0x07) << 13) | ((qinfo.TagHeader.CanonicalFormatId & 0x01) << 12) | (qinfo.TagHeader.VlanId & 0x0FFF);
In addition, anywhere there is a ProbeForRead or ProbeForWrite, these should be surrounded by a _try / _except block (and so should any additional access to the buffers). See https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nf-wdm-probeforread for more information.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In NDisDriver.c, line 1531 the following code will always evaluate to 0:
tag_us = (qinfo.TagHeader.UserPriority & 0x07 << 13) |
(qinfo.TagHeader.CanonicalFormatId & 0x01 << 12) |
(qinfo.TagHeader.VlanId & 0x0FFF);
This is because the shift operations take precedence over the and operations. To correct this, add parenthesis as such:
tag_us = ((qinfo.TagHeader.UserPriority & 0x07) << 13) |
((qinfo.TagHeader.CanonicalFormatId & 0x01) << 12) |
(qinfo.TagHeader.VlanId & 0x0FFF);
In addition, anywhere there is a ProbeForRead or ProbeForWrite, these should be surrounded by a _try / _except block (and so should any additional access to the buffers). See https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/wdm/nf-wdm-probeforread for more information.
The text was updated successfully, but these errors were encountered: