Re: [FFmpeg-devel] [PATCH] dnn_backend_native: Add overflow check for length calculation.

2020-07-06 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel On Behalf Of Reimar > D?ffinger > Sent: 2020年7月6日 15:32 > To: ffmpeg-devel@ffmpeg.org > Subject: [FFmpeg-devel] [PATCH] dnn_backend_native: Add overflow check for > length calculation. > > We should not silently

[FFmpeg-devel] [PATCH] dnn_backend_native: Add overflow check for length calculation.

2020-07-06 Thread Reimar Döffinger
We should not silently allocate an incorrect sized buffer. Fixes trac issue #8718. TODO1: calculate_operand_dims_count is almost identical code, should they be merged and its usages check for overflow? TODO2: the -1 return value seems questionable to me, but is aligned with the return value used fo

[FFmpeg-devel] [PATCH] dnn_backend_native: Add overflow check for length calculation.

2020-07-06 Thread Reimar Döffinger
We should not silently allocate an incorrect sized buffer. Fixes trac issue #8718. TODO1: calculate_operand_dims_count is almost identical code, should they be merged and its usages check for overflow? TODO2: the -1 return value seems questionable to me, but is aligned with the return value used fo