CID: 1482090 there can return null from av_frame_get_side_data, and will use sd->data after av_frame_get_side_data, so should check null return value.
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -77,6 +77,10 @@ static int dnn_classify_post_proc(AVFrame *frame, DNNData *output, uint32_t bbox · 76 unmodified lines | ||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DETECTION_BBOXES); |
| 80 | + if (!sd) { | |
| 81 | + av_log(filter_ctx, AV_LOG_ERROR, "Cannot get side data in dnn_classify_post_proc\n"); | |
| 82 | + return -1; | |
| 83 | + } | |
| 80 | 84 | header = (AVDetectionBBoxHeader *)sd->data; |
| 81 | 85 | |
| 82 | 86 | if (bbox_index == 0) { |