Related: CID1591878 Uninitialized scalar variable Related: CID1591928 Uninitialized pointer read
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -806,7 +806,7 @@ int ff_dxva2_commit_buffer(AVCodecContext *avctx, · 805 unmodified lines | ||
| 806 | 806 | unsigned type, const void *data, unsigned size, |
| 807 | 807 | unsigned mb_count) |
| 808 | 808 | { |
| 809 | − void *dxva_data; | |
| 809 | + void *dxva_data = NULL; | |
| 810 | 810 | unsigned dxva_size; |
| 811 | 811 | int result; |
| 812 | 812 | HRESULT hr = 0; |
| @@ -828,7 +828,7 @@ int ff_dxva2_commit_buffer(AVCodecContext *avctx, · 15 unmodified lines | ||
| 828 | 828 | type, (unsigned)hr); |
| 829 | 829 | return -1; |
| 830 | 830 | } |
| 831 | − if (size <= dxva_size) { | |
| 831 | + if (dxva_data && size <= dxva_size) { | |
| 832 | 832 | memcpy(dxva_data, data, size); |
| 833 | 833 | |
| 834 | 834 | #if CONFIG_D3D11VA |