mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavfi/dnn/dnn_io_proc.c: Fix Out-of-bounds access (ARRAY_VS_SINGLETON)
fix coverity CID 1473571, 1473577 and 1482089
This commit is contained in:
parent
11b489d592
commit
bd6ea9ed1d
@ -154,7 +154,7 @@ static DNNReturnType proc_from_frame_to_dnn_frameprocessing(AVFrame *frame, DNND
|
|||||||
}
|
}
|
||||||
sws_scale(sws_ctx, (const uint8_t **)frame->data,
|
sws_scale(sws_ctx, (const uint8_t **)frame->data,
|
||||||
frame->linesize, 0, frame->height,
|
frame->linesize, 0, frame->height,
|
||||||
(uint8_t * const*)(&input->data),
|
(uint8_t * const [4]){input->data, 0, 0, 0},
|
||||||
(const int [4]){frame->width * sizeof(float), 0, 0, 0});
|
(const int [4]){frame->width * sizeof(float), 0, 0, 0});
|
||||||
sws_freeContext(sws_ctx);
|
sws_freeContext(sws_ctx);
|
||||||
break;
|
break;
|
||||||
@ -236,7 +236,7 @@ DNNReturnType ff_frame_to_dnn_classify(AVFrame *frame, DNNData *input, uint32_t
|
|||||||
|
|
||||||
sws_scale(sws_ctx, (const uint8_t *const *)&bbox_data, frame->linesize,
|
sws_scale(sws_ctx, (const uint8_t *const *)&bbox_data, frame->linesize,
|
||||||
0, height,
|
0, height,
|
||||||
(uint8_t *const *)(&input->data), linesizes);
|
(uint8_t *const [4]){input->data, 0, 0, 0}, linesizes);
|
||||||
|
|
||||||
sws_freeContext(sws_ctx);
|
sws_freeContext(sws_ctx);
|
||||||
|
|
||||||
@ -266,7 +266,7 @@ static DNNReturnType proc_from_frame_to_dnn_analytics(AVFrame *frame, DNNData *i
|
|||||||
}
|
}
|
||||||
|
|
||||||
sws_scale(sws_ctx, (const uint8_t *const *)frame->data, frame->linesize, 0, frame->height,
|
sws_scale(sws_ctx, (const uint8_t *const *)frame->data, frame->linesize, 0, frame->height,
|
||||||
(uint8_t *const *)(&input->data), linesizes);
|
(uint8_t *const [4]){input->data, 0, 0, 0}, linesizes);
|
||||||
|
|
||||||
sws_freeContext(sws_ctx);
|
sws_freeContext(sws_ctx);
|
||||||
return DNN_SUCCESS;
|
return DNN_SUCCESS;
|
||||||
|
Loading…
Reference in New Issue
Block a user