[FFmpeg-devel] [PATCH] avcodec: validate codec parameters in avcodec_parameters_to_context

Michael Niedermayer michael at niedermayer.cc
Tue Oct 25 14:43:46 EEST 2016


On Tue, Oct 25, 2016 at 01:50:47AM +0200, Andreas Cadhalpun wrote:
> This should reduce the impact of a demuxer (or API user) setting bogus
> codec parameters.
> 
> Suggested-by: wm4
> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
> ---
>  libavcodec/utils.c | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 81 insertions(+), 1 deletion(-)

This adds some warnings:

libavcodec/utils.c: In function ‘avcodec_parameters_to_context’:
libavcodec/utils.c:4256:9: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
libavcodec/utils.c:4261:9: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
libavcodec/utils.c:4266:9: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
libavcodec/utils.c:4271:9: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
libavcodec/utils.c:4276:9: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

i guess thats enum (un)signednes ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The misfortune of the wise is better than the prosperity of the fool.
-- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161025/28f38cbf/attachment.sig>


More information about the ffmpeg-devel mailing list