-
Notifications
You must be signed in to change notification settings - Fork 818
Fix CodeQL security issues #7985
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
Changes from 3 commits
a140517
5a9b8bd
e97c64b
e5ab16c
10136e6
be1a5ab
ebf740d
56722ba
7d4247e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,8 @@ CMask::CMask(BYTE StartComp, BYTE NumComp) { | |
| (StartComp + NumComp - 1) < DXBC::kAllCompMask, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this assert expression isn't correct: DXASSERT(StartComp < DXBC::kAllCompMask && NumComp <= DXBC::kAllCompMask &&
(StartComp + NumComp - 1) < DXBC::kAllCompMask,I think it should be this instead: DXASSERT(StartComp < DXBC::kWidth && NumComp <= DXBC::kWidth &&
(StartComp + NumComp) <= DXBC::kWidth,
With this corrected, I think @damyanp's comment below for having an assert like |
||
| "otherwise the caller did not check"); | ||
| m_Mask = 0; | ||
| for (BYTE c = StartComp; c < StartComp + NumComp; c++) { | ||
| BYTE EndComp = StartComp + NumComp; | ||
damyanp marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| for (BYTE c = StartComp; c < EndComp; c++) { | ||
| m_Mask |= (1 << c); | ||
| } | ||
| } | ||
|
|
||
This file was deleted.
This file was deleted.
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.
nit: for better or worse, I think LLVM code tends to prefer
unsignedtounsigned int. I'm not sure if that's an explicit coding standards thing or not though.