[FFmpeg-devel] [PATCH 2/2] lavfi/vf_drawtext.c: fix CID 1485003
Ting Fu
ting.fu at intel.com
Fri Jun 4 05:22:46 EEST 2021
CID 1485003: Memory - illegal accesses (UNINIT)
Using uninitialized value "sd".
Signed-off-by: Ting Fu <ting.fu at intel.com>
---
libavfilter/vf_drawtext.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 382d589e26..c4c09894e4 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -1554,7 +1554,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
AVFrameSideData *sd;
int loop = 1;
- if (s->text_source == AV_FRAME_DATA_DETECTION_BBOXES && sd) {
+ if (s->text_source == AV_FRAME_DATA_DETECTION_BBOXES) {
sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DETECTION_BBOXES);
if (sd) {
header = (AVDetectionBBoxHeader *)sd->data;
--
2.17.1
More information about the ffmpeg-devel
mailing list