Commit 0613d11
[MPEG2 Encode] Fix Coverity CID 4398024: INTEGER_OVERFLOW in VAAPIEncoder::SetFrames
In SetFrames, when m_RecFrameMemID is null, ind was set to 0xff (255).
This value is then assigned into CurrReconstructedPic.Index7Bits and
CurrOriginalPic.Index7Bits, both typed as UCHAR:7 (max 127), causing
Coverity to flag INTEGER_OVERFLOW (CWE-190).
Fix: use 0x7f as the invalid frame sentinel, which is the correct
maximum value for the 7-bit field and explicitly safe-by-construction.
No functional regression: hardware already truncated 0xff to 0x7f.1 parent 32c8dda commit 0613d11
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1406 | 1406 | | |
1407 | 1407 | | |
1408 | 1408 | | |
1409 | | - | |
| 1409 | + | |
1410 | 1410 | | |
1411 | 1411 | | |
1412 | 1412 | | |
| |||
0 commit comments