[FFmpeg-devel] [PATCH 5/9] avformat/fitsenc: validate input pixel format

Michael Niedermayer michael at niedermayer.cc
Wed Nov 8 22:07:34 EET 2017


On Wed, Nov 08, 2017 at 07:17:49PM +0100, Timo Rothenpieler wrote:
> Fixes CID #1416961 and #1416962
> ---
>  libavformat/fitsenc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavformat/fitsenc.c b/libavformat/fitsenc.c
> index 7cb171596c..91411f2606 100644
> --- a/libavformat/fitsenc.c
> +++ b/libavformat/fitsenc.c
> @@ -106,6 +106,8 @@ static int write_image_header(AVFormatContext *s)
>              }
>              bzero = 32768;
>              break;
> +        default:
> +            return AVERROR(EINVAL);
>      }
>  
>      if (fitsctx->first_image) {

this is not sufficient
the return value of write_image_header() is never checked


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

"Nothing to hide" only works if the folks in power share the values of
you and everyone you know entirely and always will -- Tom Scott

-------------- 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/20171108/ba26d4cd/attachment.sig>


More information about the ffmpeg-devel mailing list