Commit 92df299
[Decode] Fix Coverity static analysis issues in decode component
Fix 11 Coverity defects in the Decode component across MJPEG, JXS,
AV1, H264, and H265 decoders.
Also fix scan-modified-class: use RT_FUNC_ENTER(CheckGUID) and add
OFFSET_FUNC_CheckGUID to mfx_smartv_trace_offset.h.
MISSING_LOCK (data race condition) fixes:
- CID 3583175: Add m_mGuard lock to VideoDECODEMJPEG::Reset(), which
also covers IsSameVideoParam() accessing m_response without lock
- CID 3583205: Same Reset() lock fix covers m_platform access
- CID 3583326: Add m_mGuard lock to JXS decoder Reset() for
m_core access
- CID 3583328: Add m_mGuard lock to JXS decoder DecodeFrameCheck()
for m_core access
- CID 3583455: Add guard lock to AV1Decoder::GetCurrFrame() for
lastest_submitted_frame access
- CID 3583545: Same JXS Reset() lock fix covers m_platform access
INTEGER_OVERFLOW fixes:
- CID 3515335: Guard against l==0 in read_uniform() to prevent
uint32_t underflow on l-1 when GetUnsignedBits(n)==0
- CID 3535741: Change loop variable sliceId from uint32_t to int32_t
in H265DecoderFrameInfo::EliminateErrors() to avoid wrap-around
overflow when resetting to -1 before continue
- CID 3541793: Change loop variable sliceId from size_t to ptrdiff_t
in SetOfSlices::CleanUseless() to avoid underflow on --sliceId
- CID 3553573: Change loop variable pos from size_t to ptrdiff_t in
AccessUnit::CleanUseless() to avoid underflow on pos--
- CID 3556511: Add explicit (int32_t) cast in
DecodeExpGolombOne_H264_1u32s() when assigning uint32_t sentinel
value 0xFFFFFFFF to int32_t *pDst1 parent 8e7d61c commit 92df299
6 files changed
Lines changed: 17 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
| 304 | + | |
303 | 305 | | |
304 | 306 | | |
305 | 307 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
167 | 170 | | |
168 | 171 | | |
169 | 172 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
| 394 | + | |
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
0 commit comments